Created
June 10, 2015 03:44
-
-
Save aaronschachter/f446066e3e0c7d9e8451 to your computer and use it in GitHub Desktop.
Fuck That Noise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { | |
return 3; | |
} | |
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { | |
NSString *header = nil; | |
switch (section) { | |
case 1: | |
header = @"Fuck that noise"; | |
break; | |
case 2: | |
header = @"People doing it"; | |
break; | |
} | |
return header; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
if (section == 1) { | |
return 2; | |
} | |
return 1; | |
} | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
NSString *text; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"campaignDetailCell" forIndexPath:indexPath]; | |
if (indexPath.section == 0) { | |
if (indexPath.row == 0) { | |
text = self.campaign.callToAction; | |
} | |
} | |
else if (indexPath.section == 1) { | |
text = @"Allo, mate"; | |
if (indexPath.row == 0) { | |
text = self.campaign.factSolution; | |
} | |
} | |
else if (indexPath.section == 2) { | |
text = @"Reportback pic"; | |
} | |
cell.textLabel.text = text; | |
return cell; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment