tableView、collectionView 设置内边距
2022-10-12 本文已影响0人
失忆的程序员
需求实现的方法之一,
如头部要加一个轮播或者提示view
// 设置内边距
self.tableView.contentInset = UIEdgeInsetsMake(300, 0, 0, 0);
self.collectionView.contentInset = UIEdgeInsetsMake(300, 0, 0, 0);

需求实现的方法之一,
如头部要加一个轮播或者提示view
// 设置内边距
self.tableView.contentInset = UIEdgeInsetsMake(300, 0, 0, 0);
self.collectionView.contentInset = UIEdgeInsetsMake(300, 0, 0, 0);