无论做什么,衡量标准是有没有给自己长本事
-
pannel (noun)
piece of something ,a flat piece of wood with straight sides,which forms part of a door
a stained glass panel
设置tabbar样式的时候,设置的是tabbar controllers子控制器的tabbarItem属性,可以是普通VC,也可以是navigation controller
每一个普通view controller初始化的时候都会初始化一个 tabbar item对象,但是属性是空的
-
NSObject initialize
initialize the class before it receives its first message
+ (void)initialize;
- the runtime sends initialize to each class in a program just before the class is sent its first message from within the program,super class receive this message before their subclasses.
- initialize is invoked only once per class.if you want to perform independent initialization for the class,you should implement LOAD method.
-
设置导航栏的返回按钮
用外观类方法把bar对象拿出来,设置bar的外观,bar有一个backindicator属性,两个image都设置以后,就可以把导航栏的返回按钮初始化好
-
用masonry平分布局的思想
view1的上左下等于容器,view2的上下,宽度等于view1,view2的左边等于view1的右边,以此类推,lastView的右边等于容器的左边,这样,masonry就会自动平分view的宽度
-
为什么block里面不建议使用下划线变量 _property
因为 _property 等于 self -> _property,隐式表达了self,容易造成循环引用
-
设置tabbar 文字的颜色在当前控制器的tabbarItem上进行设置
[viewcontroller.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];