Open ZacharyDeeplet opened 9 years ago
We will save FingerCMSHD orientation when "app will terminate" and use the orientation as the next startup orientation. Reference Code: in AppDelegate
in ViewController BOOL firstTime = true; ...
-(NSUInteger)supportedInterfaceOrientations { NSInteger orientation;
if (firstTime) { orientation = [[NSUserDefaults standardUserDefaults] integerForKey:@"Orientation"]; switch (orientation) { case UIInterfaceOrientationPortrait: orientation =UIInterfaceOrientationMaskPortrait; break; case UIInterfaceOrientationLandscapeLeft: orientation =UIInterfaceOrientationMaskLandscapeLeft; break; case UIInterfaceOrientationLandscapeRight: orientation =UIInterfaceOrientationMaskLandscapeRight; break; } } else { orientation =UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight; } return orientation;
} ...
We will save FingerCMSHD orientation when "app will terminate" and use the orientation as the next startup orientation. Reference Code: in AppDelegate
in ViewController BOOL firstTime = true; ...
-(NSUInteger)supportedInterfaceOrientations { NSInteger orientation;
} ...