Skip to content

Commit 00fed12

Browse files
committed
Removed some obsolete availability checks from the iOS example apps.
1 parent f66dc7c commit 00fed12

7 files changed

Lines changed: 7 additions & 42 deletions

File tree

‎examples/AAPLot/Classes/AAPLotAppDelegate.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ @implementation AAPLotAppDelegate
1616

1717
-(void)applicationDidFinishLaunching:(UIApplication *)application
1818
{
19-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
20-
self.window.rootViewController = self.rootViewController;
21-
}
22-
else {
23-
[self.window addSubview:self.rootViewController.view];
24-
}
19+
self.window.rootViewController = self.rootViewController;
2520
[self.window makeKeyAndVisible];
2621
}
2722

‎examples/CPTTestApp-iPad/Classes/CPTTestApp_iPadAppDelegate.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ @implementation CPTTestApp_iPadAppDelegate
1515

1616
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1717
{
18-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
19-
self.window.rootViewController = self.viewController;
20-
}
21-
else {
22-
[self.window addSubview:self.viewController.view];
23-
}
18+
self.window.rootViewController = self.viewController;
2419
[self.window makeKeyAndVisible];
2520

2621
return YES;

‎examples/CPTTestApp-iPhone-SpeedTest/Classes/CPTTestApp_iPhoneAppDelegate.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ @implementation CPTTestApp_iPhoneAppDelegate
1313

1414
-(void)applicationDidFinishLaunching:(UIApplication *)application
1515
{
16-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
17-
self.window.rootViewController = self.tabBarController;
18-
}
19-
else {
20-
[self.window addSubview:self.tabBarController.view];
21-
}
16+
self.window.rootViewController = self.tabBarController;
2217
[self.window makeKeyAndVisible];
2318
}
2419

‎examples/CPTTestApp-iPhone/Classes/CPTTestApp_iPhoneAppDelegate.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ @implementation CPTTestApp_iPhoneAppDelegate
1313

1414
-(void)applicationDidFinishLaunching:(UIApplication *)application
1515
{
16-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
17-
self.window.rootViewController = self.tabBarController;
18-
}
19-
else {
20-
[self.window addSubview:self.tabBarController.view];
21-
}
16+
self.window.rootViewController = self.tabBarController;
2217
[self.window makeKeyAndVisible];
2318
}
2419

‎examples/CorePlotGallery/src/ios/ipad/Plot_GalleryAppDelegate.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(N
2828
{
2929
[[PlotGallery sharedPlotGallery] sortByTitle];
3030

31-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
32-
self.window.rootViewController = self.splitViewController;
33-
}
34-
else {
35-
[self.window addSubview:self.splitViewController.view];
36-
}
31+
self.window.rootViewController = self.splitViewController;
3732
[self.window makeKeyAndVisible];
3833

3934
return YES;

‎examples/CorePlotGallery/src/ios/iphone/PlotGalleryAppDelegate-iPhone.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(N
1818
{
1919
[[PlotGallery sharedPlotGallery] sortByTitle];
2020

21-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
22-
self.window.rootViewController = self.navigationController;
23-
}
24-
else {
25-
[self.window addSubview:self.navigationController.view];
26-
}
21+
self.window.rootViewController = self.navigationController;
2722
[self.window makeKeyAndVisible];
2823

2924
return YES;

‎examples/StockPlot/Classes/StockPlotAppDelegate.m‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ -(void)applicationDidFinishLaunching:(UIApplication *)application
2121
{
2222
[[self.navigationController navigationBar] setTintColor:[UIColor blackColor]];
2323

24-
if ( [self.window respondsToSelector:@selector(setRootViewController:)] ) {
25-
self.window.rootViewController = self.navigationController;
26-
}
27-
else {
28-
[self.window addSubview:self.navigationController.view];
29-
}
24+
self.window.rootViewController = self.navigationController;
3025
[self.window makeKeyAndVisible];
3126
}
3227

0 commit comments

Comments
 (0)