2017年3月29日

IOS item属性总结

摘要: 一、UINavigationItem1> 获得方式self.navigationItem // self是指控制器2> 作用可以用来设置当前控制器顶部导航栏的内容// 设置导航栏中间的内容self.navigationItem.titleself.navigationItem.titleView二、 阅读全文

posted @ 2017-03-29 21:56 守望星空 阅读(147) 评论(0) 推荐(0) 编辑

IOS 4个容易混淆的属性(textAligment contentVerticalAlignment contentHorizontalAlignment contentMode)

摘要: 四个容易混淆的属性:1. textAligment : 文字的水平方向的对齐方式1> 取值NSTextAlignmentLeft = 0, // 左对齐NSTextAlignmentCenter = 1, // 居中对齐NSTextAlignmentRight = 2, // 右对齐2> 哪些控件有 阅读全文

posted @ 2017-03-29 21:48 守望星空 阅读(161) 评论(0) 推荐(0) 编辑

IOS 拉伸图片(封装)

摘要: /** * 根据图片名返回一张能够自由拉伸的图片 */ +(UIImage *)resizedImage:(NSString *)name { UIImage *image=[UIImage imageWithName:name]; return [image stretchableImageWithLeftCapWidth:image.size.width*0.5... 阅读全文

posted @ 2017-03-29 21:36 守望星空 阅读(144) 评论(0) 推荐(0) 编辑

IOS 搜索条制作(UITextField 封装)

摘要: 封装到 HMSearchBar.h / .m #import <UIKit/UIKit.h> @interface HMSearchBar : UITextField + (instancetype)searchBar; @end #import "HMSearchBar.h" @implement 阅读全文

posted @ 2017-03-29 21:35 守望星空 阅读(181) 评论(0) 推荐(0) 编辑

导航