When I updated my app to Xcode 8.2.1 I received a lot of new errors that I didn't have before. I was able to successfully fix most of them but I still have one error that I am struggling with. Whenever I press a button that is supposed to open up the photo gallery in landscape mode the app crashes and I get the following error
Thread 1:EXC_BAD_INSTRUCTION (code=EXC_l386_INVOP, subcode = 0x0)
on line 7 down below "return (visibleViewController?.supportedInterfaceOrientations)!"
extension UINavigationController {
open override var shouldAutorotate : Bool {
return true
}
open override var supportedInterfaceOrientations : UIInterfaceOrientationMask {
return (visibleViewController?.supportedInterfaceOrientations)!
}
}