56 lines
1.6 KiB
Objective-C
56 lines
1.6 KiB
Objective-C
//
|
|
// AppDelegate.m
|
|
// ProductApp
|
|
//
|
|
// Created by yx_macmini on 2021/11/17.
|
|
//
|
|
|
|
#import "AppDelegate.h"
|
|
#import "NavgationController.h"
|
|
#import "StartViewController.h"
|
|
|
|
|
|
#import "StartKTXZPGDetailViewController.h"
|
|
|
|
@interface AppDelegate ()
|
|
|
|
@end
|
|
|
|
@implementation AppDelegate
|
|
|
|
/// 在这里写支持的旋转方向,为了防止横屏方向,应用启动时候界面变为横屏模式
|
|
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
|
|
// return UIInterfaceOrientationMaskLandscapeRight;///启动就横屏
|
|
// // 可以这么写
|
|
// if (self.allowOrentitaionRotation) {
|
|
// return UIInterfaceOrientationMaskAllButUpsideDown;
|
|
// }
|
|
return UIInterfaceOrientationMaskPortrait;
|
|
}
|
|
|
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
|
self.window.backgroundColor = [UIColor whiteColor];
|
|
|
|
[self.window setRootViewController:[[NavgationController alloc] initWithRootViewController:[StartKTXZPGDetailViewController new]]];
|
|
|
|
[self.window makeKeyAndVisible];
|
|
|
|
///禁止黑暗模式
|
|
#if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
|
|
if(@available(iOS 13.0,*)){
|
|
self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
|
|
}
|
|
#endif
|
|
|
|
return YES;
|
|
}
|
|
- (void)applicationDidBecomeActive:(UIApplication *)application
|
|
{
|
|
///
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"huoquidfanotifi" object:nil];
|
|
}
|
|
|
|
@end
|