1010#import " ReachabilityUtils.h"
1111#import " WPWebViewController.h"
1212
13- @interface AboutViewController (Private)
14- - (void )dismiss ;
15- - (void )openURLWithString : (NSString *)path ;
16- @end
17-
1813@implementation AboutViewController
1914
2015@synthesize buttonsView;
2116@synthesize logoView;
2217
18+ #define LANDSCAPE_BUTTONS_Y -20 .0f
19+ #define PORTRAIT_BUTTONS_Y 90 .0f
20+
2321// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
2422- (void )viewDidLoad {
2523 [FileLogger log: @" %@ %@ " , self , NSStringFromSelector (_cmd )];
@@ -28,7 +26,7 @@ - (void)viewDidLoad {
2826 self.navigationItem .title = NSLocalizedString(@" About" , @" About this app (information page title)" );
2927 self.view .backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @" welcome_bg_pattern.png" ]];
3028
31- if ( [self .navigationController.viewControllers count ] == 1 )
29+ if ([self .navigationController.viewControllers count ] == 1 )
3230 self.navigationItem .rightBarButtonItem = [[UIBarButtonItem alloc ] initWithTitle: NSLocalizedString(@" Close" , @" " ) style: UIBarButtonItemStyleBordered target: self action: @selector (dismiss )];
3331}
3432
@@ -37,18 +35,17 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
3735 return [super shouldAutorotateToInterfaceOrientation: interfaceOrientation];
3836}
3937
40-
4138- (void )willRotateToInterfaceOrientation : (UIInterfaceOrientation)toInterfaceOrientation duration : (NSTimeInterval )duration {
42- if ( IS_IPHONE ) {
43- if ( YES == UIInterfaceOrientationIsLandscape (toInterfaceOrientation) ) {
39+ if (IS_IPHONE) {
40+ if (YES == UIInterfaceOrientationIsLandscape (toInterfaceOrientation)) {
4441 self.logoView .hidden = YES ;
4542 CGRect frame = buttonsView.frame ;
46- frame.origin .y = - 20 . 0f ;
43+ frame.origin .y = LANDSCAPE_BUTTONS_Y ;
4744 self.buttonsView .frame = frame;
4845 } else {
4946 self.logoView .hidden = NO ;
5047 CGRect frame = buttonsView.frame ;
51- frame.origin .y = 90 . 0f ;
48+ frame.origin .y = PORTRAIT_BUTTONS_Y ;
5249 self.buttonsView .frame = frame;
5350 }
5451 }
0 commit comments