hidesBottomBarWhenPushed 黑影bug

问题描述:
在storyboard中勾选UIViewController的Hide Bottom Bar On Push属性,或者设置UIViewController的hidesBottomBarWhenPushed为YES。然后进行UINavigationController的push操作。切换ViewController时,导航栏右边会出现黑色类似阴影的东西。
问题分析:
此为iOS的bug,只能绕开hidesBottomBarWhenPushed。
问题解决:
可以通过在代码中控制UITabBarController的tabBar的hidden属性来隐藏bottom bar。
在需要隐藏的ViewController的ViewWillAppear中,将其设置为YES;在需要显示的VewController的ViewWillAppear中,将其设置为NO.

PS: under iOS8, Xcode beta6 GM

iOS8 Extension中横竖屏Notification问题

问题描述:输入法Extension中使用Notification监听UIApplicationDidChangeStatusBarOrientationNotification,发现userInfo中返回转屏前方向

问题分析:使用self.interfaceOrientation发现同样返回的是转屏前方向。查了下文档,发现:

UIApplicationWillChangeStatusBarOrientationNotification
Posted when the app is about to change the orientation of its interface.

UIApplicationDidChangeStatusBarOrientationNotification
Posted when the orientation of the app’s user interface changes.

问题解决:替换为UIApplicationWillChangeStatusBarOrientationNotification监听事件,返回正常

PS:Xcode6 beta5, iOS8 ,Keyboard Extension