天天看點

iOS navigationBar與tabBar的translucent

navigationBar

當 ​

​translucent = YES​

​​ (預設值) 時,​

​UIViewController​

​​ 中 ​

​self.view​

​​ 的原點是​

​(0,0)​

當 ​

​translucent = NO​

​​ 時,​

​UIViewController​

​​ 中 ​

​self.view​

​​ 的原點是 ​

​(0,CGRectGetMaxY(self.navigationController.navigationBar.frame))​

tabBar

當 ​

​translucent = YES​

​​ (預設值) 時,​

​UIViewController​

​​ 中 ​

​self.view​

​​ 的底部會被 ​

​tabBar​

​ 遮擋

當 ​

​translucent = NO​

​​ 時,​

​UIViewController​

​​ 中 ​

​self.view​

​​ 的底部不會被 ​

​tabBar​

​ 遮擋,也就是:

CGRectGetMaxY(self.view.frame) == CGRectGetMinY(self.tabBarController.tabBar.frame);

CollectionView橫向排版:

​​https://github.com/xjh093/JHCollectionViewFlowLayout​​