Why is shouldAutorotate missing from UIViewControl...
# ios
j
Why is shouldAutorotate missing from UIViewController? Is there another way to tell a viewcontroller written in kotlin how rotation should behave?
s
It is not missing. This category member is naturally imported as an extension.
j
Hmm, is there an example for this?
s
Example for what?
j
On how to setup a shouldAutorotate override
for a viewcontroller
s
This category member is naturally imported as an extension.
You can’t override an extension in Kotlin.
j
Allright, so there is no way to implement so that a view controller is locked into for example portrait in kotlin? Sorry I'm not really getting it
s
There is no way to override
shouldAutorotate
in Kotlin. Not sure whether it is the same. Likely depends on your particular use case.