【发布时间】:2017-06-15 06:40:56
【问题描述】:
我突然开始收到这个编译器错误。昨天还好好的! (iOS 10.2)
“UIViewController”类型的值没有成员“hidesBottomBarWhenPushed”
在override func prepare(for segue: UIStoryboardSegue, sender: Any?) 中设置这个segue.destination.hidesBottomBarWhenPushed = true
更新:仅在模拟器上运行时才会发生。在实际设备上没问题。
【问题讨论】:
-
你说的是哪个iOS版本?
-
@Varun iOS 10.2
-
添加检查条件避免错误:
if (segue.destination.responds(to: #selector(getter: UIViewController.hidesBottomBarWhenPushed))) { // Call hidesBottomBarWhenPushed in here }
标签: ios swift3 uicontainerview