Skip to main content
Language

Embed using UIKit

The controllers provided by PhotoEditor SDK can be embedded in an UINavigationController.

Create the photo editor#

Create the photo editor by instantiating PhotoEditViewController and pass it the photo asset to be edited. In our example, we load an example photo from the app bundle. We further set the current class as the controller's delegate to handle cancellation.

Embed in an UINavigationController#

Create and present a navigation controller that hosts the photo editor. The photo editor will now use the navigation controller's navigation bar for its cancel and save buttons instead of its own toolbar. If the photo editor is the navigation controller's root view controller, it will display the close button on the left side of the navigation bar and call photoEditViewControllerDidCancel(_:) when the user taps on it. If the photo editor is not the navigation controller's root view controller, it will display the regular back button on the left side of the navigation bar and will not call photoEditViewControllerDidCancel(_:) when the user taps on it.

Next Steps#