UICollectionView adds top margin

前端 未结 9 1665
走了就别回头了
走了就别回头了 2020-12-04 14:06

I want to put a UICollectionView control that shows thumbs horizontally (only a single line of thumbs). For some reason the UICollectionView push the thumbs 44 pixels down,

9条回答
  •  無奈伤痛
    2020-12-04 14:43

    Similar to @Sviatoslav answer, you can try the following:

    - (void) viewDidLayoutSubviews {
        [super viewDidLayoutSubviews];
    
        yourCollectionView.contentOffset = CGPointMake(0, 0);
    }
    

提交回复
热议问题