Re: setFrame doesn't work if I put the view into UINavigationController?
Re: setFrame doesn't work if I put the view into UINavigationController?
- Subject: Re: setFrame doesn't work if I put the view into UINavigationController?
- From: GongHao [龚浩] <email@hidden>
- Date: Sun, 29 Mar 2015 15:26:47 +0800
- Acceptlanguage: zh-CN
- Thread-topic: setFrame doesn't work if I put the view into UINavigationController?
Thanks,
Eventually I got it work by doing it in navigationController:didShowViewController:animated:
UINavigationController will set the content view controller's view size in a private method _startTransition:fromViewController:toViewController: , changing the frame after this call should work.
This is quite hacky though.
在 2015/3/29 15:13, Kyle Sluder 写道:
On Sun, Mar 29, 2015, at 12:24 AM, GongHao [龚浩] wrote:
I want to change the frame size of my UIViewController in viewDidAppear:
The frame of a view controller's view is dictated by the _parent_ of the
view controller that owns the view.
, usually it works but if I add the UIViewController into a
UINavigationController, setFrame doesn't work any more. Anyone knows how
I can get it work well?
As per the above, the navigation controller owns this frame. It is not
yours to change.
--Kyle Sluder
_______________________________________________
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