2019-05-13 星期一 2 of 7

无论做什么,衡量标准是有没有给自己长本事

  • pannel (noun)

piece of something ,a flat piece of wood with straight sides,which forms part of a door

a stained glass panel


image.png
  • 设置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];

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容