@@ -21,15 +21,15 @@ @implementation SampleTableViewController
21
21
- (void )viewDidLoad
22
22
{
23
23
[super viewDidLoad ];
24
-
24
+
25
25
self.scrollView .translatesAutoresizingMaskIntoConstraints = NO ;
26
26
self.tableView .translatesAutoresizingMaskIntoConstraints = NO ;
27
27
28
28
_data = @[@[@{@" name" :@" Map Sample" }],@[@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" },@{@" name" :@" Gallery Sample" }]];
29
-
30
-
29
+
30
+
31
31
[self setNeedsStatusBarAppearanceUpdate ];
32
-
32
+
33
33
[self .tableView reloadData ];
34
34
}
35
35
@@ -59,9 +59,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
59
59
{
60
60
static NSString *CellIdentifier = @" Cell" ;
61
61
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier forIndexPath: indexPath];
62
-
62
+
63
63
[cell.textLabel setText: [[[_data objectAtIndex: indexPath.section] objectAtIndex: indexPath.row] objectForKey: @" name" ]];
64
-
64
+
65
65
return cell;
66
66
}
67
67
@@ -70,17 +70,17 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte
70
70
}
71
71
72
72
- (void )tableView : (UITableView *)tableView didSelectRowAtIndexPath : (NSIndexPath *)indexPath {
73
-
73
+
74
74
UIViewController *controller;
75
75
if (indexPath.section == 0 ){
76
76
controller = [self .storyboard instantiateViewControllerWithIdentifier: @" ParallaxMapViewController" ];
77
-
77
+
78
78
}else {
79
79
controller = [self .storyboard instantiateViewControllerWithIdentifier: @" ParallaxPhotoViewController" ];
80
80
}
81
-
81
+
82
82
[self presentViewController: controller animated: YES completion: nil ];
83
-
83
+
84
84
}
85
85
86
86
/*
@@ -99,10 +99,10 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd
99
99
if (editingStyle == UITableViewCellEditingStyleDelete) {
100
100
// Delete the row from the data source
101
101
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
102
- }
102
+ }
103
103
else if (editingStyle == UITableViewCellEditingStyleInsert) {
104
104
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
105
- }
105
+ }
106
106
}
107
107
*/
108
108
@@ -134,7 +134,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
134
134
135
135
*/
136
136
137
- - (UIScrollView *)scrollViewForParallexController {
137
+ - (UIScrollView *)scrollViewForParallaxController {
138
138
return self.tableView ;
139
139
}
140
140
0 commit comments