百变邓超
作者: CouldHll
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
《老男孩猛龙过江》
《整容日记》
《人间·小团圆》
《小时代2:青木时代》
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
《同桌的你》
《一夜惊喜》
Swift下Array不能使用!可变标记
问题描述:Xcode beta4的Array从
[]改成了
这种用法。然后定义成
,报错如下:
Immutable value of type only has mutating members named 'append'
问题分析:可空符号其实是一层封装,使用时实际上需要压包和解包。使Array变成了let。可能是Xcode的一个bug。
暂时先去除!,这样用:






