---
title: "begin(withDelegate:didEnd:contextInfo:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikpicturetaker/begin(withdelegate:didend:contextinfo:)"
---

# begin(withDelegate:didEnd:contextInfo:)

Opens a picture taker pane.

## Declaration

```swift
func begin(withDelegate delegate: Any!, didEnd didEndSelector: Selector!, contextInfo: UnsafeMutableRawPointer!)
```

## Parameters

- `delegate`: The object that will invoke the selector didEndSelector when the picture taker session terminates.
- `didEndSelector`: The selector to invoke when the picture taker session terminates.
- `contextInfo`: Any data that must be passed as an argument to the delegate through didEndSelector after the picture taker session terminates.

## Discussion

Discussion The didEndSelector method should have the following signature: - (void)pictureTakerDidEnd:(IKPictureTaker *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; The returnCode value is set to NSOKButton if the user validates, or to NSCancelButton if the user cancels.

## See Also

### Creating And Displaying The Picture Taker

- [pictureTaker()](quartz/ikpicturetaker/picturetaker().md)
- [beginSheet(for:withDelegate:didEnd:contextInfo:)](quartz/ikpicturetaker/beginsheet(for:withdelegate:didend:contextinfo:).md)
- [popUpRecentsMenu(for:withDelegate:didEnd:contextInfo:)](quartz/ikpicturetaker/popuprecentsmenu(for:withdelegate:didend:contextinfo:).md)
- [runModal()](quartz/ikpicturetaker/runmodal().md)
