作者:手浪用户2502876054 | 来源:互联网 | 2023-09-24 18:35
1,在AppDelegate.mm文件中将下面的将注释掉-(NSUInteger)supportedInterfaceOrientations{iPhoneonlyi
1,在AppDelegate.mm 文件中将下面的将注释掉
//-(NSUInteger)supportedInterfaceOrientations {
//
// // iPhone only
// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
// return UIInterfaceOrientationMaskLandscape;
// return UIInterfaceOrientationMaskPortrait;
// // iPad only
// return UIInterfaceOrientationMaskLandscape;
//}
//
//// Supported orientations. Customize it for your own needs
//// Only valid on iOS 4 / 5. NOT VALID for iOS 6.
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
//{
// // iPhone only
// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
// //return UIInterfaceOrientationIsLandscape(interfaceOrientation);
// return UIInterfaceOrientationIsPortrait(interfaceOrientation);
// //return UIInterfaceOrientationMaskAll;
// // iPad only
// // iPhone only
// return UIInterfaceOrientationIsLandscape(interfaceOrientation);
//
//}
2 、在info.plist
折磨了很久,版本不一样头疼。