[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]

后端 未结 3 1850
滥情空心
滥情空心 2021-02-07 11:27

I am using a tableview to display a message and i used the code below

UIView *chatView = [self bubbleView:[NSString stringWithFormat:@\"%@\", message] from:YES];         


        
相关标签:
3条回答
  • 2021-02-07 11:34

    Make sure your table view is getting reloaded before scrolling. because after adding the data in the array, we need to reload the data to populate the TableView cell.

    0 讨论(0)
  • 2021-02-07 11:46

    Seems to me that your table view does not have any rows or sections in yet. Two possibilities come to my mind.

    1. Check your numberOfRowsInSection delegate and numberOfSectionsInTableView so that they are not set to 0.
    2. Its possible that the tableview has not yet finished loading the data.

    Do share your findings, so I might be able to help out further if needed.

    0 讨论(0)
  • 2021-02-07 11:49

    I got this problem when my tableView delegate and dataSource was mapped to another view controller. Make sure you haven't done the same.

    0 讨论(0)
提交回复
热议问题