master
 1#import <UIKit/UIKit.h>
 2
 3@interface AppDelegate : UIResponder <UIApplicationDelegate>
 4@property (strong, nonatomic) UIWindow *window;
 5@end
 6
 7int main() {
 8  @autoreleasepool {
 9    return UIApplicationMain(0, nil, nil, NSStringFromClass([AppDelegate class]));
10  }
11}
12
13@implementation AppDelegate
14
15- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(id)options {
16  CGRect mainScreenBounds = [[UIScreen mainScreen] bounds];
17  self.window = [[UIWindow alloc] initWithFrame:mainScreenBounds];
18  UIViewController *viewController = [[UIViewController alloc] init];
19  viewController.view.frame = mainScreenBounds;
20
21  NSString* msg = @"Hello world";
22
23  UILabel *label = [[UILabel alloc] initWithFrame:mainScreenBounds];
24  [label setText:msg];
25  [viewController.view addSubview: label];
26
27  self.window.rootViewController = viewController;
28
29  [self.window makeKeyAndVisible];
30
31  return YES;
32}
33
34@end