开发者

How to correct interfaceOrientation of viewControllers that weren't in response chain when rotating?

开发者 https://www.devze.com 2023-02-11 12:04 出处:网络
I\'ve build a paginated interface using UIScrollView (something like spring board). Each page has its own vi开发者_Python百科ew controller as the logic on each page is rather complicated.

I've build a paginated interface using UIScrollView (something like spring board). Each page has its own vi开发者_Python百科ew controller as the logic on each page is rather complicated.

The code worked smoothly in portial orientation. Now I need make it to react to orientation changes. But self.interfaceOrientation do not react to orientation changes.

If a controller is invisible during the interface rotation its interfaceOrientation remains unchanged. I suppose that this is because the controller wasn't in the response chain when that rotation happend.

Is there any way to correct the interface orientation programmatically?

I know that I can use [UIApplication sharedApplication].statusBarOrientation to get the correct orientation but it doesn't look clean to me.


I've just propagated the interface orientation change manually down to the page view controllers.

0

精彩评论

暂无评论...
验证码 换一张
取 消