Masonry是一个轻量级的布局框架,拥有自己的描述语法,采用更优雅的链式语法封装自动布局,简洁明了并具有高可读性,而且同时支持 iOS 和 Max OS X。Masonry是一个用代码写iOS或OS界面的库,可以代替Auto layout。

Masonry的github地址:https://github.com/SnapKit/Masonry


Masonry配置

  • 推荐使用pods方式引入类库,pod ‘Masonry’

  • 引入头文件 #import “Masonry.h”


Masonry使用讲解

mas_makeConstraints 是给view添加约束,约束有几种,分别是边距,宽,高,左上右下距离,基准线。添加过约束后可以有修正,修正有offset(位移)修正和multipliedBy(倍率)修正。

语法一般是 make.equalTo or make.greaterThanOrEqualTo or make.lessThanOrEqualTo + 倍数和位移修正。

注意点:

  1. 使用 mas_makeConstraints方法的元素必须事先添加到父元素的中,例如

    [self.view addSubview:view];
  2. masequalTo 和 equalTo 区别:masequalTo 比equalTo多了类型转换操作,一般来说,大多数时候两个方法都是 通用的,但是对于数值元素使用mas_equalTo。对于对象或是多个属性的处理,使用equalTo。特别是多个属性时,必须使用equalTo,例如

    make.left.and.right.equalTo(self.view);
  3. 注意到方法with和and,这连个方法其实没有做任何操作,方法只是返回对象本身,这这个方法的左右完全是为了方法写的时候的可读性 。

    make.left.and.right.equalTo(self.view);

    make.left.right.equalTo(self.view);

    是完全一样的,但是明显的加了and方法的语句可读性 更好点。


Masonry实例

Masonry初级使用例子

// exp1: 中心点与self.view相同,宽度为400*400
-(void)exp1{UIView *view = [UIView new];[view setBackgroundColor:[UIColor redColor]];[self.view addSubview:view];[view mas_makeConstraints:^(MASConstraintMaker *make) {make.center.equalTo(self.view);make.size.mas_equalTo(CGSizeMake(400,400));}];
}
//exp2: 上下左右边距都为10
-(void)exp2{UIView *view = [UIView new];[view setBackgroundColor:[UIColor redColor]];[self.view addSubview:view];[view mas_makeConstraints:^(MASConstraintMaker *make) {make.edges.equalTo(self.view).with.insets(UIEdgeInsetsMake(10, 10, 10, 10));//  make.left.equalTo(self.view).with.offset(10);//  make.right.equalTo(self.view).with.offset(-10);//  make.top.equalTo(self.view).with.offset(10);//  make.bottom.equalTo(self.view).with.offset(-10);}];
}
//exp3 让两个高度为150的view垂直居中且等宽且等间隔排列 间隔为10
-(void)exp3{UIView *view1 = [UIView new];[view1 setBackgroundColor:[UIColor redColor]];[self.view addSubview:view1];UIView *view2 = [UIView new];[view2 setBackgroundColor:[UIColor redColor]];[self.view addSubview:view2];[view1 mas_makeConstraints:^(MASConstraintMaker *make) {make.centerY.mas_equalTo(self.view.mas_centerY);make.height.mas_equalTo(150);make.width.mas_equalTo(view2.mas_width);make.left.mas_equalTo(self.view.mas_left).with.offset(10);make.right.mas_equalTo(view2.mas_left).offset(-10);}];[view2 mas_makeConstraints:^(MASConstraintMaker *make) {make.centerY.mas_equalTo(self.view.mas_centerY);make.height.mas_equalTo(150);make.width.mas_equalTo(view1.mas_width);make.left.mas_equalTo(view1.mas_right).with.offset(10);make.right.equalTo(self.view.mas_right).offset(-10);}];
}

Masonry高级使用例子1

iOS计算器使用Masorny布局:

//高级布局练习 ios自带计算器布局
-(void)exp4{//申明区域,displayView是显示区域,keyboardView是键盘区域UIView *displayView = [UIView new];[displayView setBackgroundColor:[UIColor blackColor]];[self.view addSubview:displayView]; UIView *keyboardView = [UIView new];[self.view addSubview:keyboardView]; //先按1:3分割 displView(显示结果区域)和 keyboardView(键盘区域)[displayView mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(self.view.mas_top);make.left.and.right.equalTo(self.view);make.height.equalTo(keyboardView).multipliedBy(0.3f);}]; [keyboardView mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(displayView.mas_bottom);make.bottom.equalTo(self.view.mas_bottom);make.left.and.right.equalTo(self.view);}]; //设置显示位置的数字为0UILabel *displayNum = [[UILabel alloc]init];[displayView addSubview:displayNum];displayNum.text = @"0";displayNum.font = [UIFont fontWithName:@"HeiTi SC" size:70];displayNum.textColor = [UIColor whiteColor];displayNum.textAlignment = NSTextAlignmentRight; [displayNum mas_makeConstraints:^(MASConstraintMaker *make) {make.left.and.right.equalTo(displayView).with.offset(-10);make.bottom.equalTo(displayView).with.offset(-10);}];//定义键盘键名称,?号代表合并的单元格NSArray *keys = @[@"AC",@"+/-",@"%",@"÷",@"7",@"8",@"9",@"x",@"4",@"5",@"6",@"-",@"1",@"2",@"3",@"+",@"0",@"?",@".",@"="];int indexOfKeys = 0;for (NSString *key in keys){//循环所有键indexOfKeys++;int rowNum = indexOfKeys %4 ==0? indexOfKeys/4:indexOfKeys/4 +1;int colNum = indexOfKeys %4 ==0? 4 :indexOfKeys %4;NSLog(@"index is:%d and row:%d,col:%d",indexOfKeys,rowNum,colNum);//键样式UIButton *keyView = [UIButton buttonWithType:UIButtonTypeCustom];[keyboardView addSubview:keyView];[keyView setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];[keyView setTitle:key forState:UIControlStateNormal];[keyView.layer setBorderWidth:1];[keyView.layer setBorderColor:[[UIColor blackColor]CGColor]];[keyView.titleLabel setFont:[UIFont fontWithName:@"Arial-BoldItalicMT" size:30]];//键约束[keyView mas_makeConstraints:^(MASConstraintMaker *make) {//处理 0 合并单元格if([key isEqualToString:@"0"] || [key isEqualToString:@"?"] ){if([key isEqualToString:@"0"]){[keyView mas_makeConstraints:^(MASConstraintMaker *make) {make.height.equalTo(keyboardView.mas_height).with.multipliedBy(.2f);make.width.equalTo(keyboardView.mas_width).multipliedBy(.5);make.left.equalTo(keyboardView.mas_left);make.baseline.equalTo(keyboardView.mas_baseline).with.multipliedBy(.9f);}];}if([key isEqualToString:@"?"]){[keyView removeFromSuperview];}}//正常的单元格else{make.width.equalTo(keyboardView.mas_width).with.multipliedBy(.25f);make.height.equalTo(keyboardView.mas_height).with.multipliedBy(.2f);//按照行和列添加约束,这里添加行约束switch (rowNum) {case 1:{make.baseline.equalTo(keyboardView.mas_baseline).with.multipliedBy(.1f);keyView.backgroundColor = [UIColor colorWithRed:205 green:205 blue:205 alpha:1];}break;case 2:{make.baseline.equalTo(keyboardView.mas_baseline).with.multipliedBy(.3f);}break;case 3:{make.baseline.equalTo(keyboardView.mas_baseline).with.multipliedBy(.5f);}break;case 4:{make.baseline.equalTo(keyboardView.mas_baseline).with.multipliedBy(.7f);}break;case 5:{make.baseline.equalTo(keyboardView.mas_baseline).with.multipliedBy(.9f);}break;default:break;}//按照行和列添加约束,这里添加列约束switch (colNum) {case 1:{make.left.equalTo(keyboardView.mas_left);}break;case 2:{make.right.equalTo(keyboardView.mas_centerX);}break;case 3:{make.left.equalTo(keyboardView.mas_centerX);}break;case 4:{make.right.equalTo(keyboardView.mas_right);[keyView setBackgroundColor:[UIColor colorWithRed:243 green:127 blue:38 alpha:1]];}break;default:break;}}}];}
}

本例子使用的baseline去控制高度位置,这似乎不是太准,如果想要精准控制高度位置,可以使用一行一行添加的方法,每次当前行的top去equelTo上一行的bottom。

给个提示:

for(遍历所有行)for(遍历所以列)//当前行约束根据上一行去设置......

下一个例子中,使用上面类似的方法

Masonry高级使用例子2

根据设计图,使用masonry布局:

步骤1

步骤2


步骤1

 -(void)createUI{UIView *titleView = [UIView new];titleView.backgroundColor = [UIColor redColor];UIView *caredView = [UIView new];[self.view addSubview:caredView]; UIView *brifeView = [UIView new];[self.view addSubview:brifeView];//self.viewself.view.backgroundColor = [UIColor colorWithWhite:0.965 alpha:1.000];//thrmUIImageView *plantThrm = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"defalutPlantReferenceIcon"]];[self.view addSubview:plantThrm]; [plantThrm mas_makeConstraints:^(MASConstraintMaker *make) {make.left.and.top.equalTo(self.view).with.offset(10);}];//title[self.view addSubview:titleView];UIImageView *bgTitleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bg-plant-reference-title"]];[titleView addSubview:bgTitleView]; [titleView mas_makeConstraints:^(MASConstraintMaker *make) {make.right.equalTo(self.view.mas_right);make.left.equalTo(plantThrm.mas_right).with.offset(20);make.centerY.equalTo(plantThrm.mas_centerY);}]; [bgTitleView mas_makeConstraints:^(MASConstraintMaker *make) {make.edges.equalTo(titleView);}];UILabel *title = [[UILabel alloc]init];title.textColor =  [UIColor whiteColor];title.font = [UIFont fontWithName:@"Heiti SC" size:26];title.text = _reference.name;[titleView addSubview:title]; [title mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(titleView.mas_left).offset(10);make.width.equalTo(titleView.mas_width);make.centerY.equalTo(titleView.mas_centerY);}];//植物养护UILabel *caredTitle = [[UILabel alloc]init];caredTitle.textColor =  [UIColor colorWithRed:0.172 green:0.171 blue:0.219 alpha:1.000];caredTitle.font = [UIFont fontWithName:@"Heiti SC" size:10];caredTitle.text = @"植物养护";[self.view addSubview:caredTitle]; [caredTitle mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(plantThrm.mas_bottom).with.offset(20);make.left.and.right.equalTo(self.view).with.offset(10);make.height.mas_equalTo(10);}];//将图层的边框设置为圆脚caredView.layer.cornerRadius = 5;caredView.layer.masksToBounds = YES;//给图层添加一个有色边框caredView.layer.borderWidth = 1;caredView.layer.borderColor = [[UIColor colorWithWhite:0.521 alpha:1.000] CGColor];caredView.backgroundColor = [UIColor whiteColor]; [caredView mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(caredTitle.mas_bottom).with.offset(5);make.left.equalTo(self.view.mas_left).with.offset(10);make.right.equalTo(self.view.mas_right).with.offset(-10);make.height.equalTo(brifeView);}];//植物简介UILabel *brifeTitle = [[UILabel alloc]init];brifeTitle.textColor =  [UIColor colorWithRed:0.172 green:0.171 blue:0.219 alpha:1.000];brifeTitle.font = [UIFont fontWithName:@"Heiti SC" size:10];brifeTitle.text = @"植物简介";[self.view addSubview:brifeTitle]; [brifeTitle mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(caredView.mas_bottom).with.offset(20);make.left.and.right.equalTo(self.view).with.offset(10);make.height.mas_equalTo(10);}];//将图层的边框设置为圆脚brifeView.layer.cornerRadius = 5;brifeView.layer.masksToBounds = YES;//给图层添加一个有色边框brifeView.layer.borderWidth = 1;brifeView.layer.borderColor = [[UIColor colorWithWhite:0.521 alpha:1.000] CGColor];brifeView.backgroundColor = [UIColor whiteColor]; [brifeView mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(brifeTitle.mas_bottom).with.offset(5);make.left.equalTo(self.view.mas_left).with.offset(10);make.right.equalTo(self.view.mas_right).with.offset(-10);make.bottom.equalTo(self.view.mas_bottom).with.offset(-10);make.height.equalTo(caredView);}];
}

完成之后如下图 步骤1

步骤2,在上面的基础上,增加植物养护部分ui构造的代码,思想是,先构造出四行,然后根据每行单独构造出行样式。

//把块拆分为四行
-(void)createIndexUIWithView:(UIView *)view{//拆分四行UIView *row1 = [UIView new];UIView *row2 = [UIView new];UIView *row3 = [UIView new];UIView *row4 = [UIView new];[view addSubview:row1];[view addSubview:row2];[view addSubview:row3];[view addSubview:row4]; [row1 mas_makeConstraints:^(MASConstraintMaker *make) {make.right.and.left.equalTo(view);make.height.equalTo(view.mas_height).multipliedBy(0.25);make.top.equalTo(view.mas_top);}]; [row2 mas_makeConstraints:^(MASConstraintMaker *make) {make.right.and.left.equalTo(view);make.top.equalTo(row1.mas_bottom);make.height.equalTo(view.mas_height).multipliedBy(0.25);}]; [row3 mas_makeConstraints:^(MASConstraintMaker *make) {make.right.equalTo(view.mas_right);make.top.equalTo(row2.mas_bottom);make.height.equalTo(view.mas_height).multipliedBy(0.25);make.left.equalTo(view.mas_left);}]; [row4 mas_makeConstraints:^(MASConstraintMaker *make) {make.right.and.left.equalTo(view);make.top.equalTo(row3.mas_bottom);make.height.equalTo(view.mas_height).multipliedBy(0.25);}]; [self createIndexRowUI:PlantReferenceWaterIndex withUIView:row1];[self createIndexRowUI:PlantReferenceSumIndex withUIView:row2];[self createIndexRowUI:PlantReferenceTemperatureIndex withUIView:row3];[self createIndexRowUI:PlantReferenceElectrolyteIndex withUIView:row4];
}
//构造每行的UI
-(void)createIndexRowUI:(PlantReferenceIndex) index withUIView:(UIView *)view{//index标题UILabel *indexTitle = [UILabel new];indexTitle.font = [UIFont fontWithName:@"HeiTi SC" size:14];indexTitle.textColor = [UIColor colorWithWhite:0.326 alpha:1.000];[view addSubview:indexTitle]; [indexTitle mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(view.mas_left).with.offset(20);make.centerY.equalTo(view.mas_centerY);}];switch (index) {case PlantReferenceWaterIndex:{indexTitle.text = @"水分";UIImageView * current;for(int i=1;i<=5;i++){if(i<_reference.waterIndex){current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_water_light"]];}else{current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_water_dark"]];}[view addSubview:current];//间距12%,左边留空30%[current mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(view.mas_right).with.multipliedBy(0.12*(i-1) +0.3);make.centerY.equalTo(view.mas_centerY);}];}}break;case PlantReferenceSumIndex:{indexTitle.text = @"光照";UIImageView * current;for(int i=1;i<=5;i++){if(i<_reference.temperatureIndex){current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_summer_light"]];}else{current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_summer_dark"]];}[view addSubview:current];//间距12%,左边留空30%[current mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(view.mas_right).with.multipliedBy(0.12*(i-1) +0.3);make.centerY.equalTo(view.mas_centerY);}];}}break;case PlantReferenceTemperatureIndex:{indexTitle.text = @"温度";UIImageView * current;for(int i=1;i<=5;i++){if(i<_reference.sumIndex){current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_temperature_light"]];}else{current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_temperature_dark"]];}[view addSubview:current];//间距12%,左边留空30%[current mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(view.mas_right).with.multipliedBy(0.12*(i-1) +0.3);make.centerY.equalTo(view.mas_centerY);}];}}break;case PlantReferenceElectrolyteIndex:{indexTitle.text = @"肥料";UIImageView * current;for(int i=1;i<=5;i++){if(i<_reference.electrolyteIndex){current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_electolyte_light"]];}else{current = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_electolyte_dark"]];}[view addSubview:current]; //间距12%,左边留空30%[current mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(view.mas_right).with.multipliedBy(0.12*(i-1) +0.3);make.centerY.equalTo(view.mas_centerY);}];}}break;default:break;}
}
//在步骤1createui的基础上,做了一些微调。
-(void)createUI{self.title = _reference.name;UIView *titleView = [UIView new];UIView *caredView = [UIView new];[self.view addSubview:caredView];UITextView *brifeView = [UITextView new];[self.view addSubview:brifeView];//self.viewself.view.backgroundColor = [UIColor colorWithWhite:0.965 alpha:1.000];//thrmUIImageView *plantThrm = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"defalutPlantReferenceIcon"]];[self.view addSubview:plantThrm]; [plantThrm mas_makeConstraints:^(MASConstraintMaker *make) {make.left.and.top.equalTo(self.view).with.offset(10);}];//title[self.view addSubview:titleView];UIImageView *bgTitleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bg-plant-reference-title"]];[titleView addSubview:bgTitleView]; [titleView mas_makeConstraints:^(MASConstraintMaker *make) {make.right.equalTo(self.view.mas_right);make.left.equalTo(plantThrm.mas_right).with.offset(20);make.centerY.equalTo(plantThrm.mas_centerY);}];[bgTitleView mas_makeConstraints:^(MASConstraintMaker *make) {make.edges.equalTo(titleView);}];UILabel *title = [[UILabel alloc]init];title.textColor =  [UIColor whiteColor];title.font = [UIFont fontWithName:@"Heiti SC" size:26];title.text = _reference.name;[titleView addSubview:title]; [title mas_makeConstraints:^(MASConstraintMaker *make) {make.left.equalTo(titleView.mas_left).offset(10);make.width.equalTo(titleView.mas_width);make.centerY.equalTo(titleView.mas_centerY);}];//植物养护UILabel *caredTitle = [[UILabel alloc]init];caredTitle.textColor =  [UIColor colorWithRed:0.172 green:0.171 blue:0.219 alpha:1.000];caredTitle.font = [UIFont fontWithName:@"Heiti SC" size:10];caredTitle.text = @"植物养护";[self.view addSubview:caredTitle]; [caredTitle mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(plantThrm.mas_bottom).with.offset(20);make.left.and.right.equalTo(self.view).with.offset(10);make.height.mas_equalTo(10);}];//植物养护 数据[self createIndexUIWithView:caredView];//将图层的边框设置为圆脚caredView.layer.cornerRadius = 5;caredView.layer.masksToBounds = YES;//给图层添加一个有色边框caredView.layer.borderWidth = 1;caredView.layer.borderColor = [[UIColor colorWithWhite:0.521 alpha:1.000] CGColor];caredView.backgroundColor = [UIColor whiteColor]; [caredView mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(caredTitle.mas_bottom).with.offset(5);make.left.equalTo(self.view.mas_left).with.offset(10);make.right.equalTo(self.view.mas_right).with.offset(-10);make.height.equalTo(brifeView);}];//植物简介UILabel *brifeTitle = [[UILabel alloc]init];brifeTitle.textColor =  [UIColor colorWithRed:0.172 green:0.171 blue:0.219 alpha:1.000];brifeTitle.font = [UIFont fontWithName:@"Heiti SC" size:10];brifeTitle.text = @"植物简介";[self.view addSubview:brifeTitle]; [brifeTitle mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(caredView.mas_bottom).with.offset(20);make.left.and.right.equalTo(self.view).with.offset(10);make.height.mas_equalTo(10);}];//将图层的边框设置为圆脚brifeView.layer.cornerRadius = 5;brifeView.layer.masksToBounds = YES;//给图层添加一个有色边框brifeView.layer.borderWidth = 1;brifeView.layer.borderColor = [[UIColor colorWithWhite:0.447 alpha:1.000] CGColor];brifeView.backgroundColor = [UIColor whiteColor];//文字样式
//    brifeView.textColor = [UIColor colorWithWhite:0.352 alpha:1.000];
//    brifeView.font = [UIFont fontWithName:@"HeiTi SC" size:12];NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];paragraphStyle.lineHeightMultiple = 20.f;paragraphStyle.maximumLineHeight = 25.f;paragraphStyle.minimumLineHeight = 15.f;paragraphStyle.alignment = NSTextAlignmentJustified;NSDictionary *attributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:12], NSParagraphStyleAttributeName:paragraphStyle, NSForegroundColorAttributeName:[UIColor colorWithWhite:0.447 alpha:1.000]};//植物简介数据//brifeView.text = _reference.brief;brifeView.attributedText = [[NSAttributedString alloc] initWithString: _reference.brief attributes:attributes]; [brifeView mas_makeConstraints:^(MASConstraintMaker *make) {make.top.equalTo(brifeTitle.mas_bottom).with.offset(5);make.left.equalTo(self.view.mas_left).with.offset(10);make.right.equalTo(self.view.mas_right).with.offset(-10);make.bottom.equalTo(self.view.mas_bottom).with.offset(-10);make.height.equalTo(caredView);}];
}

完成之后如下图 步骤2

iOS 第三方框架-Masonry的使用相关推荐

  1. iOS开发之第三方框架Masonry

    2019独角兽企业重金招聘Python工程师标准>>> 第三方框架Masonry 该框架可以大大简化AutoLayout使用过程中对控件添加约束的代码. 框架地址:https://g ...

  2. Autolayout屏幕适配——代码实现(苹果公司 / VFL语言 / 第三方框架Masonry)

    在讲解如何通过代码来实现屏幕适配前,先来了解一下,屏幕适配中用到的约束添加的规则. 在创建约束之后,需要将其添加到作用的view上 在添加时要注意目标view需要遵循以下规则: 1. 约束规则 1&g ...

  3. IOS第三方框架集合

    简   注册 登录  添加关注 作者 xuejunjun 2015.06.06 17:39* 写了14057字,被17人关注,获得了116个喜欢 IOS第三方框架集合 字数6100 阅读17132 评 ...

  4. iOS 第三方框架-Masonry介绍与使用实践

    前言 MagicNumber -> autoresizingMask -> autolayout 以下是纯手写代码所经历的关于页面布局的三个时期 在iphone1-iphone3gs时代 ...

  5. ios开发之autolayout 第三方框架Masonry

    不管是是界面创建约束还是代码创建约束,苹果官方提供的方式都比较繁琐.所以出现了第三方框架. Masonry 在github地址如下: https://github.com/SnapKit/Masonr ...

  6. iOS 自动布局框架 – Masonry 详解

    来源:伯乐在线 - 刘小壮 如有好文章投稿,请点击 → 这里了解详情 如需转载,发送「转载」二字查看说明 目前iOS开发中大多数页面都已经开始使用Interface Builder的方式进行UI开发了 ...

  7. iOS自动布局框架-Masonry详解

    目前iOS开发中大多数页面都已经开始使用Interface Builder的方式进行UI开发了,但是在一些变化比较复杂的页面,还是需要通过代码来进行UI开发的.而且有很多比较老的项目,本身就还在采用纯 ...

  8. 常用的iOS第三方框架

    转载自:https://github.com/Tim9Liu9/TimLiu-iOS 目录 UI 下拉刷新 模糊效果 AutoLayout 富文本 图表 表相关与Tabbar 隐藏与显示 HUD与To ...

  9. Day2 : iOS第三方框架MBProgressHUD学习笔记

    今天主要学习了MBProgressHUD,受益匪浅.MB实现了弹出提示,可以很快捷的集成到项目中去.不得不说,得益于GitHub上丰富的开源第三方框架,开发工作变得非常的简便,优雅. 1.可以在弹出提 ...

最新文章

  1. 微信小程序下拉刷新和上拉加载
  2. 提升Kaggle模型的实用小技巧!
  3. 如何在vc的拆分窗口中使用CFormView派生类
  4. 《Redis设计与实现》阅读笔记(二)--简单动态字符串
  5. Ispur服务器收集系统日志,centos 7.2往rsyslog服务器端发送系统日志
  6. 和哪个专业的男生谈恋爱最惨?
  7. java中大数字表示什么_JAVA中大数字的的处理:BigInteger和BigDecimal
  8. [c++基础] const char and static const char
  9. 各种小巧的Hello World
  10. 图像形状特征(六)--AR模型形状描述子
  11. Mac 使用Navicat连接Oracle提示:ORA-21561: OID generation failed
  12. 阶段3 1.Mybatis_11.Mybatis的缓存_3 mybatis一对一实现延迟加载
  13. Java 战国大富翁,中国古代八大富翁,比皇帝还有钱!其中三位是历史上公认的商圣...
  14. Echarts滚动条
  15. 多序列比对---ClustalX比对GeneDoc美化
  16. ArcGIS Server Image 扩展模块
  17. 斯坦福、康奈尔都推荐的量子计算课程教材:《量子计算》
  18. 以下哪些属于计算机应用领域,以下哪些计算机的应用领域?()
  19. Python|Leetcode《1044》|最长重复子串
  20. 三次样条(Cubic Spline)的C++实现以及可视化

热门文章

  1. 微信网页版二维码扫码过程发生了什么
  2. SYN480R模块解码EV1527教程
  3. 行人重识别(ReID)概述
  4. Squoosh在线无损图片压缩工具中文版,JPG/webP/PNG/互转
  5. GLSL ES 语言—矢量矩阵运算
  6. 2-2学生成绩统计(加强版)
  7. 腾讯社招iOS面试记录
  8. JD2016版首页改版前端总结(转载整理)
  9. 我用Python分析1585家电商车厘子销售数据,发现这些秘密!
  10. 和风天气API调用结果乱码