iOS 개발 앱 관련

2580 단어 iOS 개발APP
AppDelegate 대상 방법

#
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
#
- (void)applicationWillResignActive:(UIApplication *)application;
#
- (void)applicationDidBecomeActive:(UIApplication *)application;
#
- (void)applicationDidEnterBackground:(UIApplication *)application;
#
- (void)applicationDidEnterForeground:(UIApplication *)application;
#
- (void)applicationWillTerminate:(UIApplication *)application;
#
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application;

APP 시작 로드

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // window (iOS UIWindow), windows
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // window
    self.window.backgroundColor = [UIColor whiteColor];

    // KCMainViewController
    KCMainViewController *mainController = [[KCMainViewController alloc]init];
    // window , (0,0)
    mainController.view.frame = self.window.bounds;

    // window ,UIWindown
    self.window.rootViewController = mainController;
    // window
    [self.window makeKeyAndVisible];
    return YES;
}

UIApplication 상용 속성 및 방법

#
//
application.applicationBadgeNumber = 8;
//
application.statusBarStyle = UIStatusBarStyleBlackOpaque;
//
application.statusBarHidden = YES;
//
application.networkActivityIndicatorVisible = YES;
#
//
[application openURL:[NSURL urlWithString:@"http://www.baidu.com"]];
//
[application openURL:[NSURL urlWithString:@"tel://xxxxxxxxx"]];
//
[application openURL:[NSURL urlWithString:@"sms://xxxxxxxxx"]];

좋은 웹페이지 즐겨찾기