Created
November 19, 2012 20:06
-
-
Save sgoodwin/4113536 to your computer and use it in GitHub Desktop.
Switch free controller.
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
@implementation RWSViewController | |
- (id)initWithStyle:(UITableViewStyle)style | |
{ | |
self = [super initWithStyle:style]; | |
if (self) { | |
RWSStaticSection *section1 = [[RWSStaticSection alloc] init]; | |
RWSStaticSection *section2 = [[RWSStaticSection alloc] init]; | |
_sections = @[section1, section2]; | |
} | |
return self; | |
} | |
#pragma mark - Table view data source | |
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
return [self.sections count]; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
RWSSection section = self.section[section]; | |
return [section numberOfObjects]; | |
} | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
RWSSection section = self.section[indexPath.section]; | |
return [section tableView:tableView cellForRow:indexPAth.row]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment