I use this to present a clearColor UIViewController in iOS 8:
self.modalPresentationStyle = UIModalPresentationCustom;
[_rootViewController presentViewController:self animated:NO completion:nil];
In this UIViewController I set
- (BOOL)shouldAutorotate
{
return NO;
}
But I can rotate this viewController when self is presenting, When I use self.modalPresentationStyle =UIModalPresentationCurrentContext
it will not clearColor but can not rotate. For UIModalPresentationCustom style how to prohibit rotation?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…