---
title: "didSelectTaskView(_:eventIndexPath:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ocktaskviewcontroller/didselecttaskview(_:eventindexpath:)"
---

# didSelectTaskView(_:eventIndexPath:)

Notifies the delegate a task view has been selected.

## Declaration

```swift
func didSelectTaskView(_ taskView: UIView & OCKTaskDisplayable, eventIndexPath: IndexPath)
```

## Parameters

- `taskView   `: The view that displays the task.
- `eventIndexPath  `: The index path of the event that is selected.

## See Also

### Handling Event Changes

- [delegate](carekit/ocktaskviewcontroller/delegate.md)
- [OCKTaskViewControllerDelegate](carekit/ocktaskviewcontrollerdelegate.md)
