I am stuck in a stupid problem since two days. I have a UITableViewController clicked in the Navigation Controller . When it loads, since there is no data, an empty table is visible:

But when I get data from the server and call [self.tableView reloadData] , both numberOfRowsInSection and heightForRowAtIndexPath receive a call, except cellForRowAtIndexPath , and my controller is displayed without a table:

I can’t understand why this is happening. All data source methods are called with the exception of cellForRowAtIndexPath . Please help me ... Thanks ..
ActLogController.h
@interface ActLogController : UITableViewController<ASIHTTPRequestDelegate,UITableViewDataSource,UITableViewDelegate> @property(strong) NSMutableArray *activityKeys; @end
ActLogController.m
- (void)viewDidLoad { [super viewDidLoad]; activityKeys = [[NSMutableArray alloc] init]; self.tableView.dataSource = self; } -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self retrieveActivityLogFromServer]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return activityKeys.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; }
EDIT
I set some dummy data in my activityKeys array, the data is displayed in the table, and cellForRowAtIndexPath is called successfully . But since I reload the data after some time, other methods are called, besides this, and the table disappears, as shown in the 2nd figure. Any ideas?
source share