1
votes

The goal is to achieve exactly the same effect as creating a new email message in the the Mail app on iOS.

When clicking on the "Compose" button at the right bottom corner of the Mail app, the present view controller fades slightly in the background and a new view controller is loaded partially on top of it. The old view controller can be still perceived at the top of the screen. The Fantastical app does it as well when clicking on the "+" button at the top right corner.

1

1 Answers

0
votes

You can add it into your current view controller as a child view controller.

// Parent View Controller

//...

let childController = ChildController()
addChildViewController(childController)

// add the child controller's view in, reframe it, animate it here
addSubview(childController.view)

// To remove the controller
childController.removeFromParentViewController()