project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.m
branchios-develop
changeset 12872 00215a7ec5f5
parent 11122 2b4e89e5203b
equal deleted inserted replaced
12871:2c06b1120749 12872:00215a7ec5f5
    21 
    21 
    22 
    22 
    23 @implementation HelpPageLobbyViewController
    23 @implementation HelpPageLobbyViewController
    24 @synthesize scrollView;
    24 @synthesize scrollView;
    25 
    25 
    26 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
    26 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    27     return rotationManager(interfaceOrientation);
    27     return rotationManager(interfaceOrientation);
    28 }
    28 }
    29 
    29 
    30 -(void) didReceiveMemoryWarning {
    30 - (void)didReceiveMemoryWarning {
    31     [super didReceiveMemoryWarning];
    31     [super didReceiveMemoryWarning];
    32     self.scrollView = nil;
    32     self.scrollView = nil;
    33 }
    33 }
    34 
    34 
    35 // on iPhone the XIBs contain UIScrollView
    35 // on iPhone the XIBs contain UIScrollView
    36 -(void) viewDidLoad {
    36 - (void)viewDidLoad {
    37     if (IS_IPAD() == NO){
    37     if (IS_IPAD() == NO){
    38         scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 650);
    38         scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 650);
    39         scrollView.maximumZoomScale = 4.0;
    39         scrollView.maximumZoomScale = 4.0;
    40         scrollView.minimumZoomScale = 0.75;
    40         scrollView.minimumZoomScale = 0.75;
    41         scrollView.clipsToBounds = YES;
    41         scrollView.clipsToBounds = YES;
    42         scrollView.delegate = self;
    42         scrollView.delegate = self;
    43     }
    43     }
    44     [super viewDidLoad];
    44     [super viewDidLoad];
    45 }
    45 }
    46 
    46 
    47 -(void) viewDidUnload {
    47 - (IBAction)dismiss {
    48     [super viewDidUnload];
       
    49     self.scrollView = nil;
       
    50 }
       
    51 
       
    52 -(void) dealloc {
       
    53     releaseAndNil(scrollView);
       
    54     [super dealloc];
       
    55 }
       
    56 
       
    57 -(IBAction) dismiss {
       
    58     [UIView animateWithDuration:0.5 animations:^{
    48     [UIView animateWithDuration:0.5 animations:^{
    59         self.view.alpha = 0;
    49         self.view.alpha = 0;
    60     } completion:^(BOOL finished){
    50     } completion:^(BOOL finished){
    61         [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0];
    51         [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0];
    62     }];
    52     }];