Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,568
329
I wondered why a stored property can only be overriden by the use of a getter?

For instance this code would work:
Code:
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        return .all
    }

but this would not work:
Code:
override var supportedInterfaceOrientations: UIInterfaceOrientationMask = .all

I also read that UIInterfaceOrientationMask is depreciated and UITraitCollection and UITraitEnvironment APIs should be used instead. Does anyone know how these are being used to enable all interfaceOrientations?

What is a bit mask by the way?

Thanks for the insights!
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.