我突然开始收到此编译错误。昨天天气很好! (iOS 10.2)
类型的价值' UIViewController'没有会员&hidesBottomBarWhenPushed'
在segue.destination.hidesBottomBarWhenPushed = true
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
更新:仅在模拟器上运行时才会发生。它在实际设备上很好。
答案 0 :(得分:0)
“ XXX”类型的值没有成员“ XXX”
调用方法或设置不存在的属性的值时,会得到以上Swift编译器错误消息。
示例
/* Static members */
UIViewController.thisPropertyDoesntExist = true
UIViewController.thisMethodDoesntExist()
/* Instance members */
let vc = UIViewController()
vc.thisPropertyDoesntExist = true
vc.thisMethodDoesntExist()
解决方案
Xcode->产品->清理生成文件夹并重新生成应用