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) viewDidLoad { |
30 -(void) viewDidLoad |
|
31 { |
|
32 [super viewDidLoad]; |
|
33 |
31 [self.tableView setBackgroundColorForAnyTable:[UIColor clearColor]]; |
34 [self.tableView setBackgroundColorForAnyTable:[UIColor clearColor]]; |
32 self.tableView.allowsSelection = NO; |
35 self.tableView.allowsSelection = NO; |
33 |
36 |
34 NSArray *array = [[NSArray alloc] initWithContentsOfFile:CREDITS_FILE()]; |
37 NSArray *array = [[NSArray alloc] initWithContentsOfFile:CREDITS_FILE()]; |
35 self.people = array; |
38 self.people = array; |
46 background.frame = self.view.frame; |
49 background.frame = self.view.frame; |
47 background.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; |
50 background.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; |
48 [self.view insertSubview:background atIndex:0]; |
51 [self.view insertSubview:background atIndex:0]; |
49 [background release]; |
52 [background release]; |
50 |
53 |
51 [super viewDidLoad]; |
54 [self localizeSegmentedControl]; |
52 } |
55 } |
53 |
56 |
54 -(IBAction) buttonPressed:(id) sender { |
57 -(IBAction) buttonPressed:(id) sender { |
55 [[AudioManagerController mainManager] playBackSound]; |
58 [[AudioManagerController mainManager] playBackSound]; |
56 [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; |
59 [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; |
|
60 } |
|
61 |
|
62 #pragma mark - Segmented Control |
|
63 |
|
64 - (void)localizeSegmentedControl |
|
65 { |
|
66 for (NSUInteger i = 0; i < self.segmentedControl.numberOfSegments; i++) |
|
67 { |
|
68 NSString *oldTitle = [self.segmentedControl titleForSegmentAtIndex:i]; |
|
69 [self.segmentedControl setTitle:NSLocalizedStringFromTable(oldTitle, @"About", nil) forSegmentAtIndex:i]; |
|
70 } |
57 } |
71 } |
58 |
72 |
59 -(IBAction) segmentedControlChanged:(id) sender { |
73 -(IBAction) segmentedControlChanged:(id) sender { |
60 [[AudioManagerController mainManager] playClickSound]; |
74 [[AudioManagerController mainManager] playClickSound]; |
61 [self.tableView setContentOffset:CGPointMake(0, 0) animated:NO]; |
75 [self.tableView setContentOffset:CGPointMake(0, 0) animated:NO]; |