• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#import <UIKit/UIKit.h>
2
3@interface AppDelegate : UIResponder <UIApplicationDelegate>
4@property (strong, nonatomic) UIWindow *window;
5@end
6
7@implementation AppDelegate
8
9@synthesize window;
10
11- (BOOL)application:(UIApplication *)application
12    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
13  #pragma unused (application, launchOptions)
14
15  self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
16  self.window.backgroundColor = [UIColor whiteColor];
17  [self.window makeKeyAndVisible];
18  self.window.rootViewController = [[UIViewController alloc] init];
19
20  UILabel *label =
21      [[UILabel alloc] initWithFrame:CGRectMake(0, 200, CGRectGetWidth(self.window.frame), 40)];
22  label.text = @"Protocol Buffer Test Harness";
23  label.textAlignment = NSTextAlignmentCenter;
24  [self.window addSubview:label];
25
26  return YES;
27}
28
29@end
30
31int main(int argc, char * argv[]) {
32  @autoreleasepool {
33    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
34  }
35}
36