1.AppDelegate.h에
#import <UIKit/UIKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end
2. AppDelegate.m 에
#import "AppDelegate.h"
#import "ViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
return YES;
}
'iOS/Mac' 카테고리의 다른 글
[iOS] Camera App 만드는 방법 (0) | 2014.01.09 |
---|---|
app에서 App Store 실행하기 (0) | 2013.12.20 |
Apple URL Scheme Reference (0) | 2013.12.20 |
XIB만 추가하여 iPhone, iPad 지원하는 방법 (0) | 2013.12.06 |
새로운 OS X Mavericks 가을에 출시 예정 (0) | 2013.10.03 |