As per Apple beta 4 release notes UIKit UIDevice orientation issue is been fixed.
Fixed: Attempting to set an orientation on UIDevice via setValue:forKey: isn’t supported and no longer works. (93367651)
i am not sure why its not working for me.
It’s not going to work. Unfortunately the release note could be worded a bit more clearly. Here’s how to understand it:
“It was a bug that this setValue:forKey: technique ever had an effect. It should never have been used by any apps. This behavior has now been fixed so that the setValue:forKey: technique no longer has an effect."
All those sites, articles, posts, gists, etc., that document this setValue:forKey: technique... they are wrong and always were. See also this thread where @eskimo declared it unsupported, years ago.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: