I am designing an iOS Passcode Lock library with a "cover view" feature, which hides the content on the screen, when the app is backgrounded. See this image.
When my PasscodeManager
receives the UIApplicationWillResignActiveNotification
notification, it does this:
[UIApplication.sharedApplication.keyWindow addSubview:self.coverView];
This works great, does exactly what I want to do! However, if the iPad is in landscape orientation, this view does not rotate, and looks horrible on the iOS 7 multitasking preview interface.
I know that UIViewController
handles rotations, but I am not sure how to use it for this purpose, because I can't seem to push a UIViewController when the app is getting backgrounded (it looks like 2 view controllers are on top of each other, each half visible).