// // AppDelegate.m // 唔即云相册 // // Created by 余衡武 on 2021/12/8. // #import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate + (AppDelegate*)sharedAppDelegate { static AppDelegate *appDelegate = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ if (appDelegate == nil) { appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate]; } }); return appDelegate; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //设置默认值 self.couldPhone_W_PHONE = 720.0; self.couldPhone_H_PHONE = 1280.0; [[UIButton appearance] setExclusiveTouch:YES]; return YES; } /// 在这里写支持的旋转方向,为了防止横屏方向,应用启动时候界面变为横屏模式 - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { return UIInterfaceOrientationMaskPortrait; } #pragma mark - UISceneSession lifecycle - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; } - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } @end