How to Use IOS pover View

Source: Internet
Author: User

// Popupcontentviewcontroller is a custom viewcontrler that needs to be popped up for popover. The content shown in the pop-up box is this

Popupcontentviewcontroller * popcontentviewcontrol = [[popupcontentviewcontroller
Alloc] init];

// Setup the popover for use in the Detail View. popovermenu is the previously declared uipopovercontroller object.

// You must use viewcontroller in the pop-up box you created to initialize popover.

Popovermenu = [uipopovercontroller
Alloc] initwithcontentviewcontroller: popcontentviewcontrol];

// Private method of 4.x

[Popovermenu
Setvalue: [nsnumber
Numberwithint: 2]
Forkey: @ "popoverbackgroundstyle"];

// The values are 0-black, 1-white, and 2-white,

// You can also use the following public method to modify the background color of the navigation section in uipopovercontroller.

// [[[Popovermenu contentviewcontroller] view] setbackgroundcolor: [uicolor orangecolor];

// Uipopoverarrowdirectiondown indicates the arrow direction, and down indicates the downward

Popovermenu. popovercontentsize =
Cgsizemake (500,
30 );

[Popovermenu
Presentpoverfromrect: cgrectmake (620, y,
100, 10)
Inview: Self. View
Permittedarrowdirections ctions: uipopoverarrowdirectiondown
Animated: Yes];

Related Article

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.