0
問題:滾動再次頂部到的tableView改變內容偏移和它隱藏第一的tableView細胞。的tableView的內容自動偏移量改變如果canFocusRowAtIndexPath設置爲NO
我知道有很多帖子上的tableView的滾動視圖滾動的問題,即滾動後的tableView內容偏移量的變化,但有解決方案並沒有幫助我。
我試圖設置內容偏移0 - (空)layoutSubviews方法,但沒有幫助。此外,這並沒有幫助。
self.automaticallyAdjustsScrollViewInsets = NO;
self.parentViewController.automaticallyAdjustsScrollViewInsets = NO;
詳情: 時的tableView負載,我看到的內容偏移設置爲{0,0}爲港幣$ 48
印刷描述:
<UITableView: 0x7fca15828400; frame = (0 0; 1920 1080); autoresize = RM+BM; gestureRecognizers = <NSArray: 0x60800024cb40>; layer = <CALayer: 0x60800022c780>; contentOffset: {0, 0}; contentSize: {1920, 1600}>
當我向下滾動,並且頂部再次,我看到抵消內容改變。
的$ 10打印描述:
<UITableView: 0x7fca14880400; frame = (0 0; 1920 1080); autoresize = RM+BM; gestureRecognizers = <NSArray: 0x618000056da0>; layer = <CALayer: 0x618000037920>; contentOffset: {0, 108}; contentSize: {1920, 3754}>
不過,我設置canFocusRowAtIndexPath爲YES,我沒有看到滾動視圖的問題,但我不想給tableViewCell關注。
- (BOOL)tableView:(UITableView *)tableView canFocusRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
請幫忙嗎?