project_files/HedgewarsMobile/Classes/OverlayViewController.m
changeset 6615 65602f1ef0f8
parent 6612 8fd6bb239a1e
child 6624 e049b5bb0ad1
equal deleted inserted replaced
6614:f88f67a17a9d 6615:65602f1ef0f8
    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)