• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UIPopoverController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIPopoverController


  • Subject: Re: UIPopoverController
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 13 Mar 2013 16:29:01 -0400

Do you have a sample so we can see what you mean?

I've been doing a few popovers recently that are completely independent from a UISplitViewController.  It can be a little challenging getting a grip on how you should set things up.  Generally, I'll programmatically set the popover's viewController with initWithContentViewController like so:

    PopoverContentViewController *popoverContent = [[PopoverContentViewController alloc] init];

    // Setup the popover for use from the navigation bar.
    infoPopoverController = [[UIPopoverController alloc] initWithContentViewController:popoverContent];
    infoPopoverController.popoverContentSize = CGSizeMake(320.0, 244.0);
    infoPopoverController.delegate = self;

So, you can make the content as wide as you want within the PopoverContentViewController view controller.

Then when a button is tapped, I'll call this:

- (IBAction)InfoButtonPressed:(id)sender {
 	// Set the sender to a UIBarButtonItem.
	UIBarButtonItem *tappedButton = (UIBarButtonItem *)sender;

	// If the master list popover is showing, dismiss it before presenting the popover from the bar button item.
	if (infoPopoverController != nil) {
        [infoPopoverController dismissPopoverAnimated:YES];
    }

	// If the popover is already showing from the bar button item, dismiss it. Otherwise, present it.
	if (infoPopoverController.popoverVisible == NO) {
		[infoPopoverController presentPopoverFromBarButtonItem:tappedButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
	}
	else {
		[infoPopoverController dismissPopoverAnimated:YES];
	}

}


Hope this helps.

On Mar 13, 2013, at 4:09 PM, koko wrote:

> I have seen some popovers that have a wider frame with text information.
>
> I cannot find how to specify this style and text an am asking for a pointer to the documentation for this feature.
>
> -koko
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >UIPopoverController (From: koko <email@hidden>)

  • Prev by Date: UIPopoverController
  • Next by Date: Setting the position of new windows
  • Previous by thread: UIPopoverController
  • Next by thread: Setting the position of new windows
  • Index(es):
    • Date
    • Thread