摄像头横竖屏适配
This commit is contained in:
parent
a0fff8e375
commit
2aa126ced3
|
|
@ -16061,6 +16061,7 @@
|
|||
GCC_PREFIX_HEADER = "Ifish/Ifish-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Ifish/Info.plist;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
|
|
@ -16180,6 +16181,7 @@
|
|||
GCC_PREFIX_HEADER = "Ifish/Ifish-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Ifish/Info.plist;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
|
|
|
|||
|
|
@ -144,13 +144,13 @@ alpha:1.0]
|
|||
|
||||
static NSString* DOMAIN_NAME =@"app.ifish7.cn";
|
||||
//正式环境
|
||||
//#define SOCKETPORT [Define sharedDefine].server
|
||||
//#define JIEKOUPORT [[Define sharedDefine] getRealSever]
|
||||
//#define JIEKOUPORTHTTP [[Define sharedDefine] getRealSever]
|
||||
#define SOCKETPORT [Define sharedDefine].server
|
||||
#define JIEKOUPORT [[Define sharedDefine] getRealSever]
|
||||
#define JIEKOUPORTHTTP [[Define sharedDefine] getRealSever]
|
||||
//测试环境
|
||||
#define SOCKETPORT @"139.196.24.156"
|
||||
#define JIEKOUPORT @"http://139.196.24.156:7080"
|
||||
#define JIEKOUPORTHTTP @"https://app.ifish7.com"
|
||||
//#define SOCKETPORT @"139.196.24.156"
|
||||
//#define JIEKOUPORT @"http://139.196.24.156:7080"
|
||||
//#define JIEKOUPORTHTTP @"https://app.ifish7.com"
|
||||
//云 @"https://app.ifish7.com"
|
||||
//云图片头像等地址 @"http://app.ifish7.com"
|
||||
//#define JIEKOUPORTHTTP @"https://app.ifish7.com"
|
||||
|
|
|
|||
|
|
@ -1289,9 +1289,22 @@ Strong UIImage *screenShotImage;//截图
|
|||
//设置横屏
|
||||
[AppDelegate sharedDefault].canFullScreen = YES;
|
||||
static int isFullScreen = 3; // 3 == 全屏 1 == 竖屏
|
||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)])
|
||||
if (@available(iOS 16.0, *)) {
|
||||
[self setNeedsUpdateOfSupportedInterfaceOrientations];
|
||||
[self.navigationController setNeedsUpdateOfSupportedInterfaceOrientations];
|
||||
|
||||
NSArray *array = [[[UIApplication sharedApplication] connectedScenes] allObjects];
|
||||
UIWindowScene *scene = (UIWindowScene *)array[0];
|
||||
UIWindowSceneGeometryPreferencesIOS *geometryPreferences = [[UIWindowSceneGeometryPreferencesIOS alloc] initWithInterfaceOrientations:UIInterfaceOrientationMaskLandscape];
|
||||
[scene requestGeometryUpdateWithPreferences:geometryPreferences
|
||||
errorHandler:^(NSError * _Nonnull error) {
|
||||
NSLog(@"wuwuFQ:%@", error);
|
||||
}];
|
||||
|
||||
} else if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)])
|
||||
{
|
||||
NSNumber *numb=[NSNumber numberWithInteger:UIInterfaceOrientationLandscapeRight];
|
||||
isFullScreen = UIInterfaceOrientationLandscapeRight;
|
||||
[[UIDevice currentDevice] performSelector:@selector(setOrientation:)
|
||||
withObject:numb];
|
||||
|
||||
|
|
@ -1327,11 +1340,23 @@ Strong UIImage *screenShotImage;//截图
|
|||
//设置竖屏
|
||||
[AppDelegate sharedDefault].canFullScreen = NO;
|
||||
static int isFullScreen = 1; // 3 == 全屏 1 == 竖屏
|
||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)])
|
||||
if (@available(iOS 16.0, *)) {
|
||||
[self setNeedsUpdateOfSupportedInterfaceOrientations];
|
||||
[self.navigationController setNeedsUpdateOfSupportedInterfaceOrientations];
|
||||
|
||||
NSArray *array = [[[UIApplication sharedApplication] connectedScenes] allObjects];
|
||||
UIWindowScene *scene = (UIWindowScene *)array[0];
|
||||
UIWindowSceneGeometryPreferencesIOS *geometryPreferences = [[UIWindowSceneGeometryPreferencesIOS alloc] initWithInterfaceOrientations:UIInterfaceOrientationMaskPortrait];
|
||||
[scene requestGeometryUpdateWithPreferences:geometryPreferences
|
||||
errorHandler:^(NSError * _Nonnull error) {
|
||||
NSLog(@"wuwuFQ:%@", error);
|
||||
}];
|
||||
|
||||
} else if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)])
|
||||
{
|
||||
NSLog(@"self.interfaceOrientation%ld",(long)UIDeviceOrientationPortrait);
|
||||
|
||||
|
||||
isFullScreen = UIDeviceOrientationPortrait;
|
||||
//NSNumber *numb=[NSNumber numberWithInteger:UIDeviceOrientationPortrait];
|
||||
//[[UIDevice currentDevice] performSelector:@selector(setOrientation:)
|
||||
// withObject:numb];
|
||||
|
|
|
|||
Loading…
Reference in New Issue