-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAPTabBarControllerForSplitController.m
More file actions
executable file
·62 lines (51 loc) · 1.92 KB
/
APTabBarControllerForSplitController.m
File metadata and controls
executable file
·62 lines (51 loc) · 1.92 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// APCustomTabBarController.m
// Custom SplitViewController
//
// Created by slatvick on 1/25/11.
// Copyright 2011 Alterplay. All rights reserved.
//
#import "APTabBarControllerForSplitController.h"
//#import "APBaseSplitViewController.h"
@implementation APTabBarControllerForSplitController
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
// slatvick: it's' necessary because it's rotated automatically
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
#pragma mark -
#pragma mark SEND EVENT TO NON–ACTIVE SPLITCONTROLLERS
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
for (UIViewController *ctrl in self.viewControllers)
{
// uncommented to support iPhone version with standard TabBarController
// if ([ctrl isKindOfClass:[APBaseSplitViewController class]])
{
[ctrl willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
}
}
}
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
for (UIViewController *ctrl in self.viewControllers)
{
// uncommented to support iPhone version with standard TabBarController
// if ([ctrl isKindOfClass:[APBaseSplitViewController class]])
{
[ctrl willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
}
}
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
for (UIViewController *ctrl in self.viewControllers)
{
// uncommented to support iPhone version with standard TabBarController
// if ([ctrl isKindOfClass:[APBaseSplitViewController class]])
{
[ctrl didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
}
}
@end