Ifd_Mobile 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/Ifd_Mobile/lib_steps.rb +145 -140
  3. data/lib/Ifd_Mobile/methods/IFD_Assertion.rb +44 -44
  4. data/lib/Ifd_Mobile/methods/core.rb +256 -256
  5. data/lib/Ifd_Mobile/methods/lib_var.rb +53 -53
  6. data/lib/Ifd_Mobile/version.rb +5 -5
  7. data/project/Gemfile +9 -9
  8. data/project/Gemfile.lock +50 -137
  9. data/project/apps/Bedder_2.0_0.17_VN.apk +0 -0
  10. data/project/apps/TestApp/Test App 2/GestureTestViewController.h +18 -18
  11. data/project/apps/TestApp/Test App 2/GestureTestViewController.m +48 -48
  12. data/project/apps/TestApp/Test App 2/GestureTestViewController.xib +46 -46
  13. data/project/apps/TestApp/Test App 2/MyViewControllerViewController.h +42 -42
  14. data/project/apps/TestApp/Test App 2/MyViewControllerViewController.m +193 -193
  15. data/project/apps/TestApp/Test App 2/TA2AppDelegate.h +28 -28
  16. data/project/apps/TestApp/Test App 2/TA2AppDelegate.m +85 -85
  17. data/project/apps/TestApp/Test App 2/TestApp-Info.plist +40 -40
  18. data/project/apps/TestApp/Test App 2/TestApp-Prefix.pch +29 -29
  19. data/project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings +21 -21
  20. data/project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib +175 -175
  21. data/project/apps/TestApp/Test App 2/main.m +31 -31
  22. data/project/apps/TestApp/TestApp.xcodeproj/project.pbxproj +336 -336
  23. data/project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
  24. data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/TestApp.xcscheme +88 -88
  25. data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/xcschememanagement.plist +22 -22
  26. data/project/apps/polyclaim.apk +0 -0
  27. data/project/features/android/Android_test1.feature +16 -14
  28. data/project/features/android/Android_test2.feature +14 -14
  29. data/project/features/iOS/iOS_test.feature +15 -15
  30. data/project/features/step_definitions/lib_steps/PolyClaim_homepage.rb +12 -2
  31. data/project/features/step_definitions/lib_steps/PolyClaim_loginpage.rb +3 -3
  32. data/project/features/step_definitions/repositories/android_ob_test.rb +9 -9
  33. data/project/features/step_definitions/repositories/ios_ob_test.rb +6 -6
  34. data/project/features/support/env.rb +36 -36
  35. data/project/features/support/hooks.rb +8 -8
  36. data/project/features/support/project_env.rb +42 -42
  37. metadata +41 -45
@@ -1,193 +1,193 @@
1
- /**
2
- * Copyright 2012 Appium Committers
3
- *
4
- * Licensed to the Apache Software Foundation (ASF) under one
5
- * or more contributor license agreements. See the NOTICE file
6
- * distributed with this work for additional information
7
- * regarding copyright ownership. The ASF licenses this file
8
- * to you under the Apache License, Version 2.0 (the
9
- * "License"); you may not use this file except in compliance
10
- * with the License. You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing,
15
- * software distributed under the License is distributed on an
16
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
- * KIND, either express or implied. See the License for the
18
- * specific language governing permissions and limitations
19
- * under the License.
20
- */
21
-
22
- #import "MyViewControllerViewController.h"
23
- #import <AddressBook/AddressBook.h>
24
- #import <CoreLocation/CoreLocation.h>
25
-
26
- @interface MyViewControllerViewController ()
27
-
28
- @end
29
-
30
- @implementation MyViewControllerViewController
31
- @synthesize computeSumButton;
32
- @synthesize answerLabel;
33
- @synthesize firstArg;
34
- @synthesize secondArg;
35
- @synthesize locationMgr;
36
- @synthesize locationStatus;
37
-
38
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
39
- {
40
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
41
- if (self) {
42
- // Custom initialization
43
- self.locationMgr = [[CLLocationManager alloc] init];
44
- self.locationMgr.desiredAccuracy = kCLLocationAccuracyBest;
45
- self.locationMgr.delegate = self;
46
- [self logLocationAuth];
47
- }
48
-
49
- return self;
50
- }
51
-
52
- - (void)viewDidLoad
53
- {
54
- [super viewDidLoad];
55
- // Do any additional setup after loading the view from its nib.
56
- firstArg.returnKeyType = UIReturnKeyDone;
57
- secondArg.returnKeyType = UIReturnKeyDone;
58
- firstArg.delegate = self;
59
- secondArg.delegate = self;
60
- [NSTimer scheduledTimerWithTimeInterval:0.2
61
- target:self
62
- selector:@selector(logLocationAuthFromTimer:)
63
- userInfo:nil
64
- repeats:NO];
65
-
66
- [firstArg setAccessibilityIdentifier:@"IntegerA"];
67
- [secondArg setAccessibilityIdentifier:@"IntegerB"];
68
- [computeSumButton setAccessibilityIdentifier:@"ComputeSumButton"];
69
- [answerLabel setAccessibilityIdentifier:@"Answer"];
70
- [locationStatus setAccessibilityIdentifier:@"locationStatus"];
71
-
72
- UISwipeGestureRecognizer * swipe =[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeUp:)];
73
- swipe.direction = UISwipeGestureRecognizerDirectionUp;
74
- [self.view addGestureRecognizer:swipe];
75
- [swipe release];
76
-
77
- computeSumButton.titleLabel.text = NSLocalizedString(@"main.button.computeSum", @"Compute Sum button");
78
- }
79
-
80
- -(void)swipeUp:(UISwipeGestureRecognizer*)gestureRecognizer
81
- {
82
- [secondArg resignFirstResponder];
83
- }
84
-
85
-
86
- - (void)logLocationAuthFromTimer:(NSTimer *)timer
87
- {
88
- [self logLocationAuth];
89
- }
90
-
91
- - (void)logLocationAuth
92
- {
93
- CLAuthorizationStatus status = [CLLocationManager authorizationStatus];
94
- if (status != kCLAuthorizationStatusRestricted && status != kCLAuthorizationStatusDenied) {
95
- locationStatus.on = YES;
96
- } else {
97
- locationStatus.on = NO;
98
- }
99
- }
100
-
101
- - (void)viewDidUnload
102
- {
103
- [self setFirstArg:nil];
104
- [self setSecondArg:nil];
105
- [self setAnswerLabel:nil];
106
- [self setLocationStatus:nil];
107
- [super viewDidUnload];
108
- // Release any retained subviews of the main view.
109
- // e.g. self.myOutlet = nil;
110
- }
111
-
112
- - (BOOL)textFieldShouldReturn:(UITextField *)textField {
113
- [textField resignFirstResponder];
114
- return YES;
115
- }
116
-
117
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
118
- {
119
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
120
- }
121
-
122
- - (void)dealloc {
123
- [self.locationMgr release];
124
- self.locationMgr = nil;
125
- [firstArg release];
126
- [secondArg release];
127
- [answerLabel release];
128
- [computeSumButton release];
129
- [super dealloc];
130
- }
131
- - (IBAction)testGesture:(id)sender
132
- {
133
- GestureTestViewController *test = [[GestureTestViewController alloc] initWithNibName:@"GestureTestViewController" bundle:nil];
134
- [self presentViewController:test animated:YES completion:NULL];
135
- }
136
-
137
- - (IBAction)computeAction:(id)sender {
138
- int a = [[firstArg text] intValue];
139
- int b = [[secondArg text] intValue];
140
- int sum = a + b;
141
- NSString *newLabelValue = [NSString stringWithFormat:@"%d",sum];
142
- [answerLabel setText:newLabelValue];
143
- [answerLabel setAccessibilityLabel:newLabelValue];
144
- }
145
-
146
- - (IBAction)showAlert:(id)sender {
147
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Cool title"
148
- message:@"this alert is so cool."
149
- delegate:nil
150
- cancelButtonTitle:@"Cancel"
151
- otherButtonTitles:@"OK", nil];
152
- [alert show];
153
- [alert release];
154
- }
155
-
156
- - (IBAction)crashApp:(id)sender {
157
- abort();
158
- }
159
-
160
- - (void)requestContactsPermission {
161
- ABAddressBookRef book = [MyViewControllerViewController addressBookForPermissionRequest];
162
- [self popContactsPermissionDialogWithAddressBook:book];
163
- }
164
-
165
- - (void)popContactsPermissionDialogWithAddressBook:(ABAddressBookRef)book {
166
- ABAddressBookRequestAccessWithCompletion(book, ^(bool granted, CFErrorRef error) {
167
- });
168
- CFRelease (book);
169
- }
170
-
171
- + (ABAddressBookRef)addressBookForPermissionRequest {
172
- CFErrorRef error = NULL;
173
- return ABAddressBookCreateWithOptions(NULL, &error);
174
- }
175
-
176
- - (IBAction)accessContactsAlert:(id)sender {
177
- if ([MyViewControllerViewController addressBookAuthorizationStatus] == kABAuthorizationStatusNotDetermined) {
178
- [self requestContactsPermission];
179
- }
180
- }
181
-
182
- - (IBAction)accessLocationAlert:(id)sender {
183
- CLLocationManager *locationManager = [[CLLocationManager alloc] init];
184
-
185
- [locationManager startUpdatingLocation];
186
- [locationManager stopUpdatingLocation];
187
- }
188
-
189
- + (ABAuthorizationStatus)addressBookAuthorizationStatus {
190
- return ABAddressBookGetAuthorizationStatus();
191
- }
192
-
193
- @end
1
+ /**
2
+ * Copyright 2012 Appium Committers
3
+ *
4
+ * Licensed to the Apache Software Foundation (ASF) under one
5
+ * or more contributor license agreements. See the NOTICE file
6
+ * distributed with this work for additional information
7
+ * regarding copyright ownership. The ASF licenses this file
8
+ * to you under the Apache License, Version 2.0 (the
9
+ * "License"); you may not use this file except in compliance
10
+ * with the License. You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing,
15
+ * software distributed under the License is distributed on an
16
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ * KIND, either express or implied. See the License for the
18
+ * specific language governing permissions and limitations
19
+ * under the License.
20
+ */
21
+
22
+ #import "MyViewControllerViewController.h"
23
+ #import <AddressBook/AddressBook.h>
24
+ #import <CoreLocation/CoreLocation.h>
25
+
26
+ @interface MyViewControllerViewController ()
27
+
28
+ @end
29
+
30
+ @implementation MyViewControllerViewController
31
+ @synthesize computeSumButton;
32
+ @synthesize answerLabel;
33
+ @synthesize firstArg;
34
+ @synthesize secondArg;
35
+ @synthesize locationMgr;
36
+ @synthesize locationStatus;
37
+
38
+ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
39
+ {
40
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
41
+ if (self) {
42
+ // Custom initialization
43
+ self.locationMgr = [[CLLocationManager alloc] init];
44
+ self.locationMgr.desiredAccuracy = kCLLocationAccuracyBest;
45
+ self.locationMgr.delegate = self;
46
+ [self logLocationAuth];
47
+ }
48
+
49
+ return self;
50
+ }
51
+
52
+ - (void)viewDidLoad
53
+ {
54
+ [super viewDidLoad];
55
+ // Do any additional setup after loading the view from its nib.
56
+ firstArg.returnKeyType = UIReturnKeyDone;
57
+ secondArg.returnKeyType = UIReturnKeyDone;
58
+ firstArg.delegate = self;
59
+ secondArg.delegate = self;
60
+ [NSTimer scheduledTimerWithTimeInterval:0.2
61
+ target:self
62
+ selector:@selector(logLocationAuthFromTimer:)
63
+ userInfo:nil
64
+ repeats:NO];
65
+
66
+ [firstArg setAccessibilityIdentifier:@"IntegerA"];
67
+ [secondArg setAccessibilityIdentifier:@"IntegerB"];
68
+ [computeSumButton setAccessibilityIdentifier:@"ComputeSumButton"];
69
+ [answerLabel setAccessibilityIdentifier:@"Answer"];
70
+ [locationStatus setAccessibilityIdentifier:@"locationStatus"];
71
+
72
+ UISwipeGestureRecognizer * swipe =[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeUp:)];
73
+ swipe.direction = UISwipeGestureRecognizerDirectionUp;
74
+ [self.view addGestureRecognizer:swipe];
75
+ [swipe release];
76
+
77
+ computeSumButton.titleLabel.text = NSLocalizedString(@"main.button.computeSum", @"Compute Sum button");
78
+ }
79
+
80
+ -(void)swipeUp:(UISwipeGestureRecognizer*)gestureRecognizer
81
+ {
82
+ [secondArg resignFirstResponder];
83
+ }
84
+
85
+
86
+ - (void)logLocationAuthFromTimer:(NSTimer *)timer
87
+ {
88
+ [self logLocationAuth];
89
+ }
90
+
91
+ - (void)logLocationAuth
92
+ {
93
+ CLAuthorizationStatus status = [CLLocationManager authorizationStatus];
94
+ if (status != kCLAuthorizationStatusRestricted && status != kCLAuthorizationStatusDenied) {
95
+ locationStatus.on = YES;
96
+ } else {
97
+ locationStatus.on = NO;
98
+ }
99
+ }
100
+
101
+ - (void)viewDidUnload
102
+ {
103
+ [self setFirstArg:nil];
104
+ [self setSecondArg:nil];
105
+ [self setAnswerLabel:nil];
106
+ [self setLocationStatus:nil];
107
+ [super viewDidUnload];
108
+ // Release any retained subviews of the main view.
109
+ // e.g. self.myOutlet = nil;
110
+ }
111
+
112
+ - (BOOL)textFieldShouldReturn:(UITextField *)textField {
113
+ [textField resignFirstResponder];
114
+ return YES;
115
+ }
116
+
117
+ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
118
+ {
119
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
120
+ }
121
+
122
+ - (void)dealloc {
123
+ [self.locationMgr release];
124
+ self.locationMgr = nil;
125
+ [firstArg release];
126
+ [secondArg release];
127
+ [answerLabel release];
128
+ [computeSumButton release];
129
+ [super dealloc];
130
+ }
131
+ - (IBAction)testGesture:(id)sender
132
+ {
133
+ GestureTestViewController *test = [[GestureTestViewController alloc] initWithNibName:@"GestureTestViewController" bundle:nil];
134
+ [self presentViewController:test animated:YES completion:NULL];
135
+ }
136
+
137
+ - (IBAction)computeAction:(id)sender {
138
+ int a = [[firstArg text] intValue];
139
+ int b = [[secondArg text] intValue];
140
+ int sum = a + b;
141
+ NSString *newLabelValue = [NSString stringWithFormat:@"%d",sum];
142
+ [answerLabel setText:newLabelValue];
143
+ [answerLabel setAccessibilityLabel:newLabelValue];
144
+ }
145
+
146
+ - (IBAction)showAlert:(id)sender {
147
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Cool title"
148
+ message:@"this alert is so cool."
149
+ delegate:nil
150
+ cancelButtonTitle:@"Cancel"
151
+ otherButtonTitles:@"OK", nil];
152
+ [alert show];
153
+ [alert release];
154
+ }
155
+
156
+ - (IBAction)crashApp:(id)sender {
157
+ abort();
158
+ }
159
+
160
+ - (void)requestContactsPermission {
161
+ ABAddressBookRef book = [MyViewControllerViewController addressBookForPermissionRequest];
162
+ [self popContactsPermissionDialogWithAddressBook:book];
163
+ }
164
+
165
+ - (void)popContactsPermissionDialogWithAddressBook:(ABAddressBookRef)book {
166
+ ABAddressBookRequestAccessWithCompletion(book, ^(bool granted, CFErrorRef error) {
167
+ });
168
+ CFRelease (book);
169
+ }
170
+
171
+ + (ABAddressBookRef)addressBookForPermissionRequest {
172
+ CFErrorRef error = NULL;
173
+ return ABAddressBookCreateWithOptions(NULL, &error);
174
+ }
175
+
176
+ - (IBAction)accessContactsAlert:(id)sender {
177
+ if ([MyViewControllerViewController addressBookAuthorizationStatus] == kABAuthorizationStatusNotDetermined) {
178
+ [self requestContactsPermission];
179
+ }
180
+ }
181
+
182
+ - (IBAction)accessLocationAlert:(id)sender {
183
+ CLLocationManager *locationManager = [[CLLocationManager alloc] init];
184
+
185
+ [locationManager startUpdatingLocation];
186
+ [locationManager stopUpdatingLocation];
187
+ }
188
+
189
+ + (ABAuthorizationStatus)addressBookAuthorizationStatus {
190
+ return ABAddressBookGetAuthorizationStatus();
191
+ }
192
+
193
+ @end
@@ -1,28 +1,28 @@
1
- /**
2
- * Copyright 2012 Appium Committers
3
- *
4
- * Licensed to the Apache Software Foundation (ASF) under one
5
- * or more contributor license agreements. See the NOTICE file
6
- * distributed with this work for additional information
7
- * regarding copyright ownership. The ASF licenses this file
8
- * to you under the Apache License, Version 2.0 (the
9
- * "License"); you may not use this file except in compliance
10
- * with the License. You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing,
15
- * software distributed under the License is distributed on an
16
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
- * KIND, either express or implied. See the License for the
18
- * specific language governing permissions and limitations
19
- * under the License.
20
- */
21
-
22
- #import <UIKit/UIKit.h>
23
-
24
- @interface TA2AppDelegate : UIResponder <UIApplicationDelegate>
25
-
26
- @property (strong, nonatomic) UIWindow *window;
27
-
28
- @end
1
+ /**
2
+ * Copyright 2012 Appium Committers
3
+ *
4
+ * Licensed to the Apache Software Foundation (ASF) under one
5
+ * or more contributor license agreements. See the NOTICE file
6
+ * distributed with this work for additional information
7
+ * regarding copyright ownership. The ASF licenses this file
8
+ * to you under the Apache License, Version 2.0 (the
9
+ * "License"); you may not use this file except in compliance
10
+ * with the License. You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing,
15
+ * software distributed under the License is distributed on an
16
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ * KIND, either express or implied. See the License for the
18
+ * specific language governing permissions and limitations
19
+ * under the License.
20
+ */
21
+
22
+ #import <UIKit/UIKit.h>
23
+
24
+ @interface TA2AppDelegate : UIResponder <UIApplicationDelegate>
25
+
26
+ @property (strong, nonatomic) UIWindow *window;
27
+
28
+ @end
@@ -1,85 +1,85 @@
1
- /**
2
- * Copyright 2012 Appium Committers
3
- *
4
- * Licensed to the Apache Software Foundation (ASF) under one
5
- * or more contributor license agreements. See the NOTICE file
6
- * distributed with this work for additional information
7
- * regarding copyright ownership. The ASF licenses this file
8
- * to you under the Apache License, Version 2.0 (the
9
- * "License"); you may not use this file except in compliance
10
- * with the License. You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing,
15
- * software distributed under the License is distributed on an
16
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
- * KIND, either express or implied. See the License for the
18
- * specific language governing permissions and limitations
19
- * under the License.
20
- */
21
-
22
- #import "TA2AppDelegate.h"
23
- #import "MyViewControllerViewController.h"
24
-
25
- @interface TA2AppDelegate ()
26
-
27
- @property (nonatomic, retain) UIViewController *myAddVC;
28
- @end
29
-
30
- @implementation TA2AppDelegate
31
-
32
- @synthesize window = _window;
33
- @synthesize myAddVC;
34
-
35
-
36
-
37
-
38
- - (void)dealloc
39
- {
40
- [_window release];
41
- [super dealloc];
42
- }
43
-
44
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
45
- {
46
- self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
47
- // Override point for customization after application launch.
48
- self.window.backgroundColor = [UIColor whiteColor];
49
- [self.window makeKeyAndVisible];
50
-
51
- self.myAddVC = [[MyViewControllerViewController alloc] init];
52
- self.myAddVC.view.frame = self.window.bounds;
53
- [self.window setRootViewController:self.myAddVC];
54
-
55
- return YES;
56
- }
57
-
58
- - (void)applicationWillResignActive:(UIApplication *)application
59
- {
60
- // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
61
- // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
62
- }
63
-
64
- - (void)applicationDidEnterBackground:(UIApplication *)application
65
- {
66
- // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
67
- // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
68
- }
69
-
70
- - (void)applicationWillEnterForeground:(UIApplication *)application
71
- {
72
- // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
73
- }
74
-
75
- - (void)applicationDidBecomeActive:(UIApplication *)application
76
- {
77
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
78
- }
79
-
80
- - (void)applicationWillTerminate:(UIApplication *)application
81
- {
82
- // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
83
- }
84
-
85
- @end
1
+ /**
2
+ * Copyright 2012 Appium Committers
3
+ *
4
+ * Licensed to the Apache Software Foundation (ASF) under one
5
+ * or more contributor license agreements. See the NOTICE file
6
+ * distributed with this work for additional information
7
+ * regarding copyright ownership. The ASF licenses this file
8
+ * to you under the Apache License, Version 2.0 (the
9
+ * "License"); you may not use this file except in compliance
10
+ * with the License. You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing,
15
+ * software distributed under the License is distributed on an
16
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ * KIND, either express or implied. See the License for the
18
+ * specific language governing permissions and limitations
19
+ * under the License.
20
+ */
21
+
22
+ #import "TA2AppDelegate.h"
23
+ #import "MyViewControllerViewController.h"
24
+
25
+ @interface TA2AppDelegate ()
26
+
27
+ @property (nonatomic, retain) UIViewController *myAddVC;
28
+ @end
29
+
30
+ @implementation TA2AppDelegate
31
+
32
+ @synthesize window = _window;
33
+ @synthesize myAddVC;
34
+
35
+
36
+
37
+
38
+ - (void)dealloc
39
+ {
40
+ [_window release];
41
+ [super dealloc];
42
+ }
43
+
44
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
45
+ {
46
+ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
47
+ // Override point for customization after application launch.
48
+ self.window.backgroundColor = [UIColor whiteColor];
49
+ [self.window makeKeyAndVisible];
50
+
51
+ self.myAddVC = [[MyViewControllerViewController alloc] init];
52
+ self.myAddVC.view.frame = self.window.bounds;
53
+ [self.window setRootViewController:self.myAddVC];
54
+
55
+ return YES;
56
+ }
57
+
58
+ - (void)applicationWillResignActive:(UIApplication *)application
59
+ {
60
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
61
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
62
+ }
63
+
64
+ - (void)applicationDidEnterBackground:(UIApplication *)application
65
+ {
66
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
67
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
68
+ }
69
+
70
+ - (void)applicationWillEnterForeground:(UIApplication *)application
71
+ {
72
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
73
+ }
74
+
75
+ - (void)applicationDidBecomeActive:(UIApplication *)application
76
+ {
77
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
78
+ }
79
+
80
+ - (void)applicationWillTerminate:(UIApplication *)application
81
+ {
82
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
83
+ }
84
+
85
+ @end