随笔分类 - IOS
UI学习
摘要:1.首先查看ruby版本 $ ruby -v 2.更新ruby源 $sudo gem update --system 3.如果用的还是taobao.org,需要移除更换成https://ruby.taobao.org/ $gem sources --remove https://ruby.taoba
阅读全文
posted @ 2016-09-05 21:06
阿法狗的世界
摘要://设置UIImage的圆角 + (UIImage *)imageNamed:(NSString *)name size:(CGSize)size cornerRadius:(CGFloat)cornerRadius { UIImage *image = [UIImage imageNamed:na
阅读全文
摘要:Masonry是一个轻量级的布局框架与更好的包装AutoLayout语法。 Masonry有它自己的布局方式,描述NSLayoutConstraints使布局代码更简洁易读。 Masonry支持iOS和Mac OS X。 Masonry github 地址:https://github.com/Sn
阅读全文
posted @ 2016-07-18 22:06
阿法狗的世界
摘要:-(instancetype)initWithFrame:(CGRect)frame{ if (self=[super initWithFrame:frame]) { self.userInteractionEnabled=NO; [self setBackgroundImage:[UIImage
阅读全文
摘要://并不是所有的类都可以调用appearance这个方法 需要遵循这个外观这个协议 但是 第一种是全部类型 第二种是当前类的类型 逻辑要严谨 UITabBarItem *item=[UITabBarItem appearance]; UITabBarItem * item=[UITabBarItem
阅读全文
posted @ 2016-07-07 00:52
阿法狗的世界
摘要:UIViewController * home=[[UIViewController alloc]init]; home.tabBarItem.title=@"首页";//设置tabBar的标题 经常忘记 self.viewControllers //设置图片不渲染 +(instancetype)i
阅读全文
摘要:// 1.设置导航条的背题图片 设置全局 UINavigationBar *navBar = [UINavigationBar appearance]; [navBar setBackgroundImage:[UIImage imageNamed:@"NavBar"] forBarMetrics:U
阅读全文
摘要:#import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UITextField *textFieldOne; @property (weak, nonatomic) IB
阅读全文
摘要:-(NSArray *)htmls{ if (!_htmls) { //从help.json加载数据 //1.获取json路径 NSString *filePath = [[NSBundle mainBundle] pathForResource:@"help.json" ofType:nil];
阅读全文

浙公网安备 33010602011771号