IPhoneIn application developmentUIPopoverControllerIs the content to be introduced in this article,UIPopoverControllerPay-as-you-go is only available on ipad. Not much content, mainly implemented by codeUIPopoverControllerTo see the details.
The Code is as follows:
- -(Void) viewDidLoad
- {
- [Super viewDidLoad];
- // List
- PopTableController * table = [[PopTableController alloc] init];
- // Set the display area size
- Table. contentSizeForViewInPopover = CGSizeMake (200,300 );
- // Instantiate UIPopoverController
- PopoverController = [[UIPopoverController alloc] initWithContentViewController: table];
- // Use the click button
- List = [[[UIBarButtonItem alloc] initWithTitle: @ "list" style: UIBarButtonItemStyleBordered target: self action: @ selector (list :)] autorelease];
- // Add the button to the toolbar
- [Toolbar setItems: [NSArray arrayWithObject: list];
- }
- // Button event
- -(Void) list :( id) sender
- {
- // Presentpoverfrombarbuttonitem: The list header points to the list button.
- [PopoverController presentpoverfrombarbuttonitem: list permittedArrowDirections ctions: UIPopoverArrowDirectionAny animated: YES];
- }
- // Hide
- -(Void) missView
- {
- // Hide the view
- [PopoverController dismissPopoverAnimated: YES];
- }
Summary:IPhoneApplication DevelopmentUIPopoverControllerI hope this article will be helpful to you!