Skip to content

Commit 587080a

Browse files
committed
WHITESPACE! Strucutre > Re-Indent to 4 spaces
1 parent 13b7713 commit 587080a

11 files changed

+615
-615
lines changed

ECSlidingViewController/AppDelegate.m

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,46 @@ @implementation AppDelegate
1414

1515
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1616
{
17-
return YES;
17+
return YES;
1818
}
1919

2020
- (void)applicationWillResignActive:(UIApplication *)application
2121
{
22-
/*
23-
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.
24-
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.
25-
*/
22+
/*
23+
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.
24+
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.
25+
*/
2626
}
2727

2828
- (void)applicationDidEnterBackground:(UIApplication *)application
2929
{
30-
/*
31-
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.
32-
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33-
*/
30+
/*
31+
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.
32+
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33+
*/
3434
}
3535

3636
- (void)applicationWillEnterForeground:(UIApplication *)application
3737
{
38-
/*
39-
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.
40-
*/
38+
/*
39+
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.
40+
*/
4141
}
4242

4343
- (void)applicationDidBecomeActive:(UIApplication *)application
4444
{
45-
/*
46-
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.
47-
*/
45+
/*
46+
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.
47+
*/
4848
}
4949

5050
- (void)applicationWillTerminate:(UIApplication *)application
5151
{
52-
/*
53-
Called when the application is about to terminate.
54-
Save data if appropriate.
55-
See also applicationDidEnterBackground:.
56-
*/
52+
/*
53+
Called when the application is about to terminate.
54+
Save data if appropriate.
55+
See also applicationDidEnterBackground:.
56+
*/
5757
}
5858

5959
@end

ECSlidingViewController/FirstTopViewController.m

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@ @implementation FirstTopViewController
1212

1313
- (void)viewWillAppear:(BOOL)animated
1414
{
15-
[super viewWillAppear:animated];
16-
17-
// shadowPath, shadowOffset, and rotation is handled by ECSlidingViewController.
18-
// You just need to set the opacity, radius, and color.
19-
self.view.layer.shadowOpacity = 0.75f;
20-
self.view.layer.shadowRadius = 10.0f;
21-
self.view.layer.shadowColor = [UIColor blackColor].CGColor;
22-
23-
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
24-
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
25-
}
26-
27-
if (![self.slidingViewController.underRightViewController isKindOfClass:[UnderRightViewController class]]) {
28-
self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"UnderRight"];
29-
}
30-
31-
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
15+
[super viewWillAppear:animated];
16+
17+
// shadowPath, shadowOffset, and rotation is handled by ECSlidingViewController.
18+
// You just need to set the opacity, radius, and color.
19+
self.view.layer.shadowOpacity = 0.75f;
20+
self.view.layer.shadowRadius = 10.0f;
21+
self.view.layer.shadowColor = [UIColor blackColor].CGColor;
22+
23+
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
24+
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
25+
}
26+
27+
if (![self.slidingViewController.underRightViewController isKindOfClass:[UnderRightViewController class]]) {
28+
self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"UnderRight"];
29+
}
30+
31+
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
3232
}
3333

3434
- (IBAction)revealMenu:(id)sender
3535
{
36-
[self.slidingViewController anchorTopViewTo:ECRight];
36+
[self.slidingViewController anchorTopViewTo:ECRight];
3737
}
3838

3939
- (IBAction)revealUnderRight:(id)sender
4040
{
41-
[self.slidingViewController anchorTopViewTo:ECLeft];
41+
[self.slidingViewController anchorTopViewTo:ECLeft];
4242
}
4343

4444
@end

ECSlidingViewController/InitialSlidingViewController.m

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,30 @@
1111
@implementation InitialSlidingViewController
1212

1313
- (void)viewDidLoad {
14-
[super viewDidLoad];
15-
16-
self.shouldAdjustChildViewHeightForStatusBar = YES;
17-
self.statusBarBackgroundView.backgroundColor = [UIColor blackColor];
18-
19-
UIStoryboard *storyboard;
20-
21-
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
22-
storyboard = [UIStoryboard storyboardWithName:@"iPhone" bundle:nil];
23-
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
24-
storyboard = [UIStoryboard storyboardWithName:@"iPad" bundle:nil];
25-
}
26-
27-
self.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"FirstTop"];
14+
[super viewDidLoad];
15+
16+
self.shouldAdjustChildViewHeightForStatusBar = YES;
17+
self.statusBarBackgroundView.backgroundColor = [UIColor blackColor];
18+
19+
UIStoryboard *storyboard;
20+
21+
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
22+
storyboard = [UIStoryboard storyboardWithName:@"iPhone" bundle:nil];
23+
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
24+
storyboard = [UIStoryboard storyboardWithName:@"iPad" bundle:nil];
25+
}
26+
27+
self.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"FirstTop"];
2828
}
2929

3030
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
3131
{
32-
return YES;
32+
return YES;
3333
}
3434

3535
- (UIStatusBarStyle)preferredStatusBarStyle
3636
{
37-
return UIStatusBarStyleLightContent;
37+
return UIStatusBarStyleLightContent;
3838
}
3939

4040
@end

ECSlidingViewController/MenuViewController.m

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,47 +17,47 @@ @implementation MenuViewController
1717

1818
- (void)awakeFromNib
1919
{
20-
self.menuItems = [NSArray arrayWithObjects:@"First", @"Second", @"Third", @"Navigation", nil];
20+
self.menuItems = [NSArray arrayWithObjects:@"First", @"Second", @"Third", @"Navigation", nil];
2121
}
2222

2323
- (void)viewDidLoad
2424
{
25-
[super viewDidLoad];
26-
27-
[self.slidingViewController setAnchorRightRevealAmount:280.0f];
28-
self.slidingViewController.underLeftWidthLayout = ECFullWidth;
25+
[super viewDidLoad];
26+
27+
[self.slidingViewController setAnchorRightRevealAmount:280.0f];
28+
self.slidingViewController.underLeftWidthLayout = ECFullWidth;
2929
}
3030

3131
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex
3232
{
33-
return self.menuItems.count;
33+
return self.menuItems.count;
3434
}
3535

3636
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
3737
{
38-
NSString *cellIdentifier = @"MenuItemCell";
39-
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
40-
if (cell == nil) {
41-
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
42-
}
43-
44-
cell.textLabel.text = [self.menuItems objectAtIndex:indexPath.row];
45-
46-
return cell;
38+
NSString *cellIdentifier = @"MenuItemCell";
39+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
40+
if (cell == nil) {
41+
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
42+
}
43+
44+
cell.textLabel.text = [self.menuItems objectAtIndex:indexPath.row];
45+
46+
return cell;
4747
}
4848

4949
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
5050
{
51-
NSString *identifier = [NSString stringWithFormat:@"%@Top", [self.menuItems objectAtIndex:indexPath.row]];
52-
53-
UIViewController *newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:identifier];
54-
55-
[self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
56-
CGRect frame = self.slidingViewController.topViewController.view.frame;
57-
self.slidingViewController.topViewController = newTopViewController;
58-
self.slidingViewController.topViewController.view.frame = frame;
59-
[self.slidingViewController resetTopView];
60-
}];
51+
NSString *identifier = [NSString stringWithFormat:@"%@Top", [self.menuItems objectAtIndex:indexPath.row]];
52+
53+
UIViewController *newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:identifier];
54+
55+
[self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
56+
CGRect frame = self.slidingViewController.topViewController.view.frame;
57+
self.slidingViewController.topViewController = newTopViewController;
58+
self.slidingViewController.topViewController.view.frame = frame;
59+
[self.slidingViewController resetTopView];
60+
}];
6161
}
6262

6363
@end

ECSlidingViewController/NavigationTopViewController.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ @implementation NavigationTopViewController
1212

1313
- (void)viewWillAppear:(BOOL)animated
1414
{
15-
[super viewWillAppear:animated];
16-
17-
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
18-
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
19-
}
20-
21-
if (![self.slidingViewController.underRightViewController isKindOfClass:[UnderRightViewController class]]) {
22-
self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"UnderRight"];
23-
}
24-
25-
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
15+
[super viewWillAppear:animated];
16+
17+
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
18+
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
19+
}
20+
21+
if (![self.slidingViewController.underRightViewController isKindOfClass:[UnderRightViewController class]]) {
22+
self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"UnderRight"];
23+
}
24+
25+
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
2626
}
2727

2828
@end

ECSlidingViewController/SampleTableViewController.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,35 @@ @implementation SampleTableViewController
1717

1818
- (void)awakeFromNib
1919
{
20-
self.sampleItems = [NSArray arrayWithObjects:@"One", @"Two", @"Three", nil];
20+
self.sampleItems = [NSArray arrayWithObjects:@"One", @"Two", @"Three", nil];
2121
}
2222

2323
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex
2424
{
25-
return self.sampleItems.count;
25+
return self.sampleItems.count;
2626
}
2727

2828
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
2929
{
30-
NSString *cellIdentifier = @"SampleCell";
31-
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
32-
if (cell == nil) {
33-
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
34-
}
35-
36-
cell.textLabel.text = [self.sampleItems objectAtIndex:indexPath.row];
37-
38-
return cell;
30+
NSString *cellIdentifier = @"SampleCell";
31+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
32+
if (cell == nil) {
33+
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
34+
}
35+
36+
cell.textLabel.text = [self.sampleItems objectAtIndex:indexPath.row];
37+
38+
return cell;
3939
}
4040

4141
- (IBAction)revealMenu:(id)sender
4242
{
43-
[self.slidingViewController anchorTopViewTo:ECRight];
43+
[self.slidingViewController anchorTopViewTo:ECRight];
4444
}
4545

4646
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
4747
{
48-
return YES;
48+
return YES;
4949
}
5050

5151
@end

ECSlidingViewController/SecondTopViewController.m

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ @implementation SecondTopViewController
1212

1313
- (void)viewWillAppear:(BOOL)animated
1414
{
15-
[super viewWillAppear:animated];
16-
17-
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
18-
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
19-
}
20-
self.slidingViewController.underRightViewController = nil;
21-
22-
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
15+
[super viewWillAppear:animated];
2316

24-
self.slidingViewController.topViewCenterMoved = ^(float x){
25-
self.view.backgroundColor = [UIColor colorWithRed:x/self.view.bounds.size.width green:50 blue:70 alpha:1];
26-
};
17+
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
18+
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
19+
}
20+
self.slidingViewController.underRightViewController = nil;
21+
22+
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
23+
24+
self.slidingViewController.topViewCenterMoved = ^(float x){
25+
self.view.backgroundColor = [UIColor colorWithRed:x/self.view.bounds.size.width green:50 blue:70 alpha:1];
26+
};
2727
}
2828

2929
- (IBAction)revealMenu:(id)sender
3030
{
31-
[self.slidingViewController anchorTopViewTo:ECRight];
31+
[self.slidingViewController anchorTopViewTo:ECRight];
3232
}
3333

3434
@end

0 commit comments

Comments
 (0)