Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
BasicBanner/BasicBanner/AppDelegate.m
/* |
Copyright (C) 2013-2015 Apple Inc. All Rights Reserved. |
See LICENSE.txt for this sample’s licensing information |
Abstract: |
Application delegate |
*/ |
#import "AppDelegate.h" |
#import "TextViewController.h" |
@implementation AppDelegate |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
{ |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
self.window.backgroundColor = [UIColor whiteColor]; |
NSData *ipsumData = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"ipsums" withExtension:@"plist"] options:NSDataReadingMappedIfSafe error:nil]; |
NSDictionary *ipsums = [NSPropertyListSerialization propertyListWithData:ipsumData options:NSPropertyListImmutable format:nil error:nil]; |
TextViewController *textViewController = [[TextViewController alloc] init]; |
textViewController.title = NSLocalizedString(@"Original", @"Original"); |
textViewController.text = ipsums[@"Original"]; |
self.window.rootViewController = textViewController; |
[self.window makeKeyAndVisible]; |
return YES; |
} |
@end |
Copyright © 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-05-28