• 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: Programmatically displaying UISplitViewController popover?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically displaying UISplitViewController popover?


  • Subject: Re: Programmatically displaying UISplitViewController popover?
  • From: Rick Mann <email@hidden>
  • Date: Fri, 03 Jun 2011 11:40:21 -0700

On Jun 3, 2011, at 5:42 , Roland King wrote:

> Which bit can't you do? Are you having trouble opening the popover (in which case you just want to call the code which would be called if you pressed the button, just call it programatically) or are you having trouble figuring out when your app is launched in portrait mode, which you could do by setting a flag in one of the application methods to say you just launched, and checking it when you get the viewDidAppear: call.

The former.

I don't call any code when the button is pressed. The UISplitView creates the UIBarButtonItem and handles the action message. This is part of the problem.

I do have a reference to the UIPopoverController, but if I call its -presentPopoverFromBarButtonItem:... method, it pops up with the approximately correct width, and a height of about 10 pixels.

I tried doing this right in -applicationDidFinishLaunching, and I tried doing it after a 1-second delay. Neither worked.

When I tap on the button, it opens correctly.

The next thing I was going to try was to see if the UIBarButtonItem had a UIButton as its view, and try to get the target/selector from that to call, but that's such a disgustingly gross hack, I hope there is a better way.

--
Rick

_______________________________________________

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

  • Follow-Ups:
    • Re: Programmatically displaying UISplitViewController popover?
      • From: Evadne Wu <email@hidden>
References: 
 >Programmatically displaying UISplitViewController popover? (From: Rick Mann <email@hidden>)
 >Re: Programmatically displaying UISplitViewController popover? (From: Roland King <email@hidden>)

  • Prev by Date: Re: NSTerminateLater and thread
  • Next by Date: Re: OS + iOS best practice
  • Previous by thread: Re: Programmatically displaying UISplitViewController popover?
  • Next by thread: Re: Programmatically displaying UISplitViewController popover?
  • Index(es):
    • Date
    • Thread