Re: UINavigationBar content margins in UIPresentationController subclass
Re: UINavigationBar content margins in UIPresentationController subclass
- Subject: Re: UINavigationBar content margins in UIPresentationController subclass
- From: David Duncan <email@hidden>
- Date: Wed, 07 Dec 2016 15:28:27 -0800
> On Dec 7, 2016, at 11:22 AM, Daniel Stenmark <email@hidden> wrote:
>
>> The most relevant looking bug I can find seems to involve pushing & popping view controllers. That said, setting the preferredContentSize on the navigation controller directly should always work.
>
> Setting preferredContentSize directly on the navigation controller works as expected. I’m more referring to the ability for navigation controllers to catch the preferredContentSize changes of their child controllers, and then use that observed size to automatically update their own preferredContentSize (which I’d expect would just add the height of the navigation controller’s UINavigationBar to the child’s observed size). Is that expected to work (i.e. is there currently a bug), or is the current lack of preferredContentSize forwarding by design?
The only bug I’ve found is basically “navigation controller’s preferred content size will never shrink”. If that isn’t what you are seeing, you should file your own bug.
>
>> Alternatively you could use your own container view controller instead.
>
> Hmm, interesting. Are you suggesting that the presentation controller have view controller property, add the view controller’s root view to the presentation controller’s container view, and then do all the presentation work in the view controller’s root view?
You would basically do the same thing you might otherwise do if you were using a UINavigationController – wrap your view controller in your container and go from there. If the only reason you needed presentation is for the navigation bar, then you wouldn’t need presentation controllers at all at that point.
>
> Dan
--
David Duncan
_______________________________________________
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