UITableViewController doesn't show content with static cell
I've been struggle for some time just because of the tableView doesn't show any content to me.
The situation is, I'm trying to create a tableView with some sections and static cells, and it served as a rootViewController of a navigationController.
Finally I solved the problem by commenting out the following line in tableViewController.m
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
// Return the number of sections.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
// Return the number of rows in the section.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
These lines are auto-generated by Xcode which I don't need it.
When you faced a problem and doesn't found any solution in google, don't panic, just continue to try again and again, the problem will be solved. :)