aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests/iOSTestHarness/AppDelegate.m
blob: 8c4a586bbddb5bb75f779ef5a43efc4f10fba3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

@implementation AppDelegate

@synthesize window;

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  #pragma unused (application, launchOptions)

  self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  self.window.backgroundColor = [UIColor whiteColor];
  [self.window makeKeyAndVisible];
  self.window.rootViewController = [[UIViewController alloc] init];

  UILabel *label =
      [[UILabel alloc] initWithFrame:CGRectMake(0, 200, CGRectGetWidth(self.window.frame), 40)];
  label.text = @"Protocol Buffer Test Harness";
  label.textAlignment = NSTextAlignmentCenter;
  [self.window addSubview:label];

  return YES;
}

@end

int main(int argc, char * argv[]) {
  @autoreleasepool {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  }
}