随笔分类 -  iOS

摘要:我们定义一个objc的属性时,有时候会用懒加载,比如 ```objc - (UITableView *)tableView { if (!_tableView) { _tableView = [UITableView new]; _tableView.delegate = self; } retur 阅读全文
posted @ 2023-08-29 15:37 wkdwangjun 阅读(83) 评论(0) 推荐(0)
摘要:有一个collection view,layout是没有问题的。当我切换页面时,cell会被自动的往下移。控制台报错: The behavior of the UICollectionViewFlowLayout is not defined because: the item height mus 阅读全文
posted @ 2017-06-02 13:24 wkdwangjun 阅读(595) 评论(0) 推荐(0)
摘要:新建一个UITabBar的子类,重载以下的方法 - (CGSize)sizeThatFits:(CGSize)size { CGSize tabBarSize = [super sizeThatFits:size]; tabBarSize.height = 37; return tabBarSize 阅读全文
posted @ 2016-08-19 15:23 wkdwangjun 阅读(232) 评论(0) 推荐(0)
摘要:出现这个警告的原因是presentViewController的receiver是一个detached view controller。比方说:window有一个root view controller,然后我们把某个view controller(VC1)的view添加到了root view co 阅读全文
posted @ 2016-08-18 15:47 wkdwangjun 阅读(233) 评论(0) 推荐(0)