注册

iOS 根据demo集成到项目中未读消息数不刷新

当收到消息时,tableview的代理只有- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section这个方法执行,- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath这个就不执行了,我看了数据是已经更新了,也是在主线程中!但是当我切换到通讯录后再切换到会话页面,又刷新了数据,但是只要不切换页面,在当前页面的话,就不会刷新数据!我调用tableview的重绘后,这次会调用了- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath这个了,但是当前页面还是不会刷新,还是需要切换页面后才刷新,不只是有没有人遇到这种情况,怎么解决的
已邀请:
确认数据源有数据么?
已经解决,确定了是视图覆盖的原因...导致tableview的代理中cellForRowAtIndexPath没有执行

要回复问题请先登录注册