Re: UINavigationBar content margins in UIPresentationController subclass

2017-01-03 Thread David Duncan
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. Alternatively you could use your own container view controller instead. > On Dec 7, 2016, at 10:42

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
> On Dec 7, 2016, at 11:22 AM, Daniel Stenmark 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. > >

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
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

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
Thanks, David. Unfortunately, UINavigationController isn’t currently an option as it doesn’t reliably bubble up preferredContentSize changes, which we have a strong dependency on and is fairly dynamic in our use case. As of 10.0, it only seems to adapt and forward the very first

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
> On Dec 7, 2016, at 10:28 AM, Daniel Stenmark wrote: > > The UINavigationBar is in the UIPresentationController’s containerView, which > is a subview of the current UIWindow and does NOT have a view controller in > its hierarchy. Is there a particular reason for

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
The UINavigationBar is in the UIPresentationController’s containerView, which is a subview of the current UIWindow and does NOT have a view controller in its hierarchy. Is there a particular reason for UINavigationBar to have this dependency for correct layout? Is there a ‘right’ way to work

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
Its unclear to me at least, but where in the view hierarchy is the UINavigationBar? If it isn’t in a view that is ultimately backed by a view controller, then it won’t have the correct information to do its layout. > On Nov 7, 2016, at 12:42 PM, Daniel Stenmark wrote:

UINavigationBar content margins in UIPresentationController subclass

2016-12-06 Thread Daniel Stenmark
I have a UIPresentationController subclass with a UINavigationBar embedded in the container view. However, when setting the rightBarButtonItem, the spacing I usually expect from the item to the screen isn't there. http://imgur.com/LHcqhyd Anyone have an idea where I