Home > Articles > Web Development

  • Print
  • + Share This
This chapter is from the book

Further Exploration

In this hour's sample project, you attached a toolbar to a "bar button" (toolbar button) using the presentPopoverFromBarButtonItem:permittedArrowDirections:animated method. This, granted, is a very popular approach, but you can create popovers anywhere within your view by using the UIPopoverController method presentPopoverFromRect:inView:permittedArrowDirections:animated. With this method you can present the popover so that it appears from any rectangular areas, within any view. In addition, popover content does not need to be static! If you'd like, your popover's view controller can update its content on-the-fly, and the popover will update dynamically to display the changes. You'll need to manually update the popoverContentSize property of the controller so that all of your content fits, but size changes are animated smoothly for the end user.

To learn more about popovers, be sure to review Apple's UIPopoverController class reference within the developer documentation to get a complete picture of this important class and UI element.

  • + Share This
  • 🔖 Save To Your Account