equal
deleted
inserted
replaced
63 return mainOverlay; |
63 return mainOverlay; |
64 } |
64 } |
65 |
65 |
66 -(void) viewDidLoad { |
66 -(void) viewDidLoad { |
67 // fill all the screen available as sdlview disables autoresizing |
67 // fill all the screen available as sdlview disables autoresizing |
68 CGRect rect = [[UIScreen mainScreen] bounds]; |
68 self.view.frame = [[UIScreen mainScreen] safeBounds]; |
69 UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; |
|
70 if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) { |
|
71 self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width); |
|
72 } else { |
|
73 self.view.frame = CGRectMake(0, 0, rect.size.width, rect.size.height); |
|
74 } |
|
75 // the timer used to dim the overlay |
69 // the timer used to dim the overlay |
76 dimTimer = [[NSTimer alloc] initWithFireDate:(IS_DUALHEAD()) ? HIDING_TIME_NEVER : [NSDate dateWithTimeIntervalSinceNow:6] |
70 dimTimer = [[NSTimer alloc] initWithFireDate:(IS_DUALHEAD()) ? HIDING_TIME_NEVER : [NSDate dateWithTimeIntervalSinceNow:6] |
77 interval:1000 |
71 interval:1000 |
78 target:self |
72 target:self |
79 selector:@selector(dimOverlay) |
73 selector:@selector(dimOverlay) |