摘要: 之前在使用UISwitch时,首先 创建: UISwitch * switchBtn = [[UISwitch alloc] init]; [self.view addSubView:switchBtn]; frame略 添加监听: [switchBtn addTarget:self action: 阅读全文
posted @ 2017-11-21 11:14 笔锋至此 阅读(1249) 评论(0) 推荐(0) 编辑
摘要: iOS11 UICollectionView顶到屏幕顶端会出现一个20高度的白色间隔,是由于UICollectionView的自动调整功能为状态栏留出的位置 只需在创建UICollectionView时加入如下代码关闭自动调整: 该属性是iOS11新加入的,所以一定要在前面加上判断!!!!! if 阅读全文
posted @ 2017-11-21 10:20 笔锋至此 阅读(2511) 评论(1) 推荐(1) 编辑