Layer,
IOS Layer的使用
http://blog.csdn.net/pjk1129/article/details/6946724
???
導航欄的 Title,
iOS中設置導航欄標題( titleView)的字體顏色和大小
http://blog.csdn.net/a249334660/article/details/50779915
在iOS中,經常會對一些導航欄titleView進行自定義,首先介紹一下對navgationBar 上的title設置的三種方法:
<1> self.title = @"我是title" ;
直接設置
<2> self.navigationItem.title = @"我是title" ;
以上兩種方法 title的顯示跟調用順序有關,誰后調用顯示誰
<3> UILabel * titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 62, 20)] ;
titleLabel.text = @"我是title" ;
self.navigationItem.titleView = titleLabel ;
以上<3>的顯示優先級是最高的 其實是<1><2>,<1><2>相互沒有優先級,只跟調用順序有關
對于titleView的字體顏色和大小 我們主要是針對于上面第三種方法進行兩種方式的設置:
<1> UILabel * titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 62, 20)] ;
titleLabel.text = @"我是title" ;
titleLabel.backgroundColor = [UIColor blueColor] ;
titleLabel.textColor = [UIColor whiteColor] ;
titleLabel.font = [UIFont systemFontOfSize:26] ;
self.navigationItem.titleView = titleLabel ;
<2> [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:26],NSForegroundColorAttributeName:[UIColor whiteColor]}] ;
???
導航欄隱藏
在具體需要隱藏和顯示導航欄的controller中實現:
http://www.cnblogs.com/zhwl/archive/2011/12/15/2288513.html
[super.navigationController setNavigationBarHidden:isflage animated:TRUE];
[super.navigationController setToolbarHidden:isflage animated:TRUE];