---
title: "visitAddSubgroup(_:)"
framework: contacts
role: symbol
role_heading: Instance Method
path: "contacts/cnchangehistoryeventvisitor/visitaddsubgroup(_:)"
---

# visitAddSubgroup(_:)

Tells the delegate that the user added a subgroup to a group.

## Declaration

```swift
optional func visitAddSubgroup(_ event: CNChangeHistoryAddSubgroupToGroupEvent)
```

## Parameters

- `event`: The event object that represents a user adding a subgroup to a group.

## Discussion

Discussion Inspect the group and subgroup in the event that the system provides and update your app’s cached data accordingly.

## See Also

### Updating subgroups

- [visitRemoveSubgroup(_:)](contacts/cnchangehistoryeventvisitor/visitremovesubgroup(_:).md)
