From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Using popovers

Using popovers

- [Instructor] When displaying modal views on an iPad, you're supposed to use a popover. However, popover's present a few challenges compared to other views. Let's look at how to set up a popover correctly. Download the exercise file and open it up. A popover is a view controller presented as a special type of modal. I've set this exercise up with a root controller with two buttons for apple pie and pecan pie and a small bar button item on the bottom for a toolbar. Now, I've got this apple pie image over here. To set it up in the storyboard is real easy. You just do a control drag from the apple pie, just like you would any other controller. And for your action segue you're gonna check present as popover. And that's pretty much it. You'll see that the image changes to a popover. You can go ahead and run that. I'm gonna do it on a 9.7 inch iPad Pro. And when that appears I can click the apple pie. I get a popover. To dismiss a popover you just click outside the popover. So that's all…

Contents