3829
|
1 |
/*
|
|
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices
|
4976
|
3 |
* Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com>
|
3829
|
4 |
*
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; version 2 of the License
|
|
8 |
*
|
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU General Public License for more details.
|
|
13 |
*
|
|
14 |
* You should have received a copy of the GNU General Public License
|
|
15 |
* along with this program; if not, write to the Free Software
|
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
17 |
*
|
|
18 |
* File created on 30/08/2010.
|
|
19 |
*/
|
|
20 |
|
3792
|
21 |
|
|
22 |
#import "HelpPageViewController.h"
|
|
23 |
#import "CommodityFunctions.h"
|
|
24 |
|
|
25 |
@implementation HelpPageViewController
|
4144
|
26 |
@synthesize scrollView;
|
3792
|
27 |
|
|
28 |
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
|
|
29 |
return rotationManager(interfaceOrientation);
|
|
30 |
}
|
|
31 |
|
|
32 |
-(void) didReceiveMemoryWarning {
|
|
33 |
[super didReceiveMemoryWarning];
|
4144
|
34 |
self.scrollView = nil;
|
|
35 |
}
|
|
36 |
|
|
37 |
// on iPhone the XIBs contain UIScrollView
|
|
38 |
-(void) viewDidLoad {
|
4754
|
39 |
if (scrollView.tag == 0) // ipad
|
4144
|
40 |
scrollView.contentSize = CGSizeMake(480,650);
|
4754
|
41 |
else // iphone
|
|
42 |
scrollView.contentSize = CGSizeMake(480,470);
|
4144
|
43 |
scrollView.maximumZoomScale = 4.0;
|
|
44 |
scrollView.minimumZoomScale = 0.75;
|
|
45 |
scrollView.clipsToBounds = YES;
|
|
46 |
scrollView.delegate = self;
|
|
47 |
[super viewDidLoad];
|
|
48 |
}
|
|
49 |
|
3792
|
50 |
-(void) viewDidUnload {
|
|
51 |
[super viewDidUnload];
|
4144
|
52 |
self.scrollView = nil;
|
3792
|
53 |
}
|
|
54 |
|
|
55 |
-(void) dealloc {
|
4144
|
56 |
[scrollView release];
|
3792
|
57 |
[super dealloc];
|
|
58 |
}
|
|
59 |
|
|
60 |
-(IBAction) dismiss {
|
|
61 |
[UIView beginAnimations:@"helpingame" context:NULL];
|
|
62 |
self.view.alpha = 0;
|
|
63 |
[UIView commitAnimations];
|
|
64 |
[self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
|
|
65 |
}
|
|
66 |
|
|
67 |
@end
|