IOS: popover

Source: Internet
Author: User

Basic Principles of popoverHttp://

This principle also applies to open source popover "wepover ".

Basic usage:






1. To display popovers without arrows, set the permittedarrowdirections parameter to 0.

2. Set the size of the view displayed by popover. Add the following code to the package in didload of the View Controller of popover:

Self. contentsizeforviewinpopover = cgsizemake (320,250 );

In addition to setting the window size in View Controller of popover, you can also set the popovercontentsize attribute of popover controller to set the window size.

The following is the official documentation of contentsizeforviewinpopover and contentsizeforviewinpopover (ref link)


The size of the View Controller's view while displayed in A popover.

This property contains the desired size for the View Controller
When it is displayed in A popover. By default, the width is set to 320 points and the height is set to 1100 points. You can change these values as needed.

The recommended width for popovers is 320 points. If needed, you can return a width value as large as600 points, but doing so is not recommended.

Popover controller displaying the View Controller sets itspopoverContentSizeProperty,
The popover controller overrides the values set in the View Controller'scontentSizeForViewInPopoverProperty

3. if your popover is a navigation controller, and the contentsizeforviewinpopover of the first view and the second view has different heights, switch from a short view to a long view, the height of the popover will be extended, but the height of the popover will not be shortened from the view with a long height to the view with a short height.

Solution ):




So try not to change the height of popover

A popover for iPhone

Another popover



When popover rejects an app:

* Multiple povers cannot appear simultaneously.


* The popover must be facing the elements that pop up.

Http:// Tid = 22000

* The popover should be able to dismiss it at any time by clicking somewhere out of its range. In other words, do not use the modal method.

* The popover should not be too large, and the width should not exceed 600;

* The alertview should also be pover.


Popover cool effect

Popover menu (not free)


Http:// Feature = endscreen & V = 8kv68eru9ui & Nr = 1

Popover Effect

Http:// V = gxcuket5rwg

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.