21 |
21 |
22 #import "HelpPageViewController.h" |
22 #import "HelpPageViewController.h" |
23 #import "CommodityFunctions.h" |
23 #import "CommodityFunctions.h" |
24 |
24 |
25 @implementation HelpPageViewController |
25 @implementation HelpPageViewController |
26 |
26 @synthesize scrollView; |
27 |
27 |
28 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { |
28 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { |
29 return rotationManager(interfaceOrientation); |
29 return rotationManager(interfaceOrientation); |
30 } |
30 } |
31 |
31 |
32 -(void) didReceiveMemoryWarning { |
32 -(void) didReceiveMemoryWarning { |
33 // Releases the view if it doesn't have a superview. |
|
34 [super didReceiveMemoryWarning]; |
33 [super didReceiveMemoryWarning]; |
35 // Release any cached data, images, etc that aren't in use. |
34 self.scrollView = nil; |
|
35 } |
|
36 |
|
37 // on iPhone the XIBs contain UIScrollView |
|
38 -(void) viewDidLoad { |
|
39 if (scrollView.tag == 0) |
|
40 scrollView.contentSize = CGSizeMake(480,650); |
|
41 else |
|
42 scrollView.contentSize = CGSizeMake(480,460); |
|
43 scrollView.maximumZoomScale = 4.0; |
|
44 scrollView.minimumZoomScale = 0.75; |
|
45 scrollView.clipsToBounds = YES; |
|
46 scrollView.delegate = self; |
|
47 [super viewDidLoad]; |
|
48 } |
|
49 |
|
50 |
|
51 -(void) scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view { |
|
52 [self.view removeFromSuperview]; |
36 } |
53 } |
37 |
54 |
38 -(void) viewDidUnload { |
55 -(void) viewDidUnload { |
39 [super viewDidUnload]; |
56 [super viewDidUnload]; |
40 // Release any retained subviews of the main view. |
57 self.scrollView = nil; |
41 // e.g. self.myOutlet = nil; |
|
42 } |
58 } |
43 |
59 |
44 -(void) dealloc { |
60 -(void) dealloc { |
|
61 [scrollView release]; |
45 [super dealloc]; |
62 [super dealloc]; |
46 } |
63 } |
47 |
64 |
|
65 // on iPad the XIBs contain UIControl |
48 -(IBAction) dismiss { |
66 -(IBAction) dismiss { |
49 [UIView beginAnimations:@"helpingame" context:NULL]; |
67 [UIView beginAnimations:@"helpingame" context:NULL]; |
50 self.view.alpha = 0; |
68 self.view.alpha = 0; |
51 [UIView commitAnimations]; |
69 [UIView commitAnimations]; |
52 [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; |
70 [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; |