platform:ios,'8.0'target 'APPNAME' do pod 'SMSSDK' pod 'MBProgressHUD', '0.9.1' pod 'AFNetworking', '2.5.4' pod 'Masonry' pod 'AMapSearch' pod 'AMapLo ...
分类:
其他好文 时间:
2016-06-22 18:33:26
阅读次数:
124
在OC开发时我常用一个名叫Masonry的第三方Autolayout库,在转Swift后发现虽然Swift可以混编OC,但总感觉有些麻烦,在Github上发现了这个叫做SnapKit的第三方库,发现使用起来更方便,与大家分享一下 1、在Github上下载SnapKit,选择iOS target 编译 ...
分类:
编程语言 时间:
2016-06-21 15:41:08
阅读次数:
218
原文 http://www.cocoachina.com/ios/20151221/14757.html 前言 自从写了 介绍Masonry 那篇文章以后 就一直有人对UIScrollView的那个例子不是很理解 UIView *container = [UIView new]; [scrollVi ...
分类:
其他好文 时间:
2016-06-09 18:41:21
阅读次数:
374
随着iPhone的手机版本越来越多, 那么对于我们广大的开发者来说就是很悲催,之前一直使用代码里面layout的约束来适配, 现在推荐一个第三方Masonry,上手块,操作简单,只能一个字形容他 “爽”~~~ 进入正题: 1 MagicNumber -> autoresizingMask -> au ...
分类:
移动开发 时间:
2016-06-08 15:27:00
阅读次数:
260
在使用 masonry 框架实现自动布局时,在程序里为一个布局穿插着6行左右这样的代码 [View mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(anotherView); make.left.equalTo(a ...
分类:
其他好文 时间:
2016-06-08 10:38:18
阅读次数:
147
#import "RootViewController.h"#import "Masonry.h" @interface RootViewController () @end @implementation RootViewController - (void)viewDidLoad { [supe ...
分类:
其他好文 时间:
2016-06-04 10:38:20
阅读次数:
220
首先我们要引入头文件 #import "Masonry.h" 然后我们可以初始化一个控件对象 如label对象 上面代码初始化了一个控件对象 label1 并将label1 添加到 self.view上 通过对象调用 mas_makeConstraints....方法 block中的make 代表l ...
分类:
其他好文 时间:
2016-06-02 00:27:27
阅读次数:
371
Masonry是一个轻量级的布局框架,拥有自己的描述语法,采用更优雅的链式语法封装自动布局,简洁明了并具有高可读性,而且同时支持 iOS 和 Max OS X。Masonry是一个用代码写iOS或OS界面的库,可以代替Auto layout。Masonry的github地址:https://gith ...
分类:
移动开发 时间:
2016-05-31 15:49:50
阅读次数:
265
转自 http://blog.sina.com.cn/s/blog_13fd67a560102wil5.html //用来记录上一次创建的UILabel UILabel *lastLabel = nil; for (int i = 0; i < 9; i++) { UILabel *label = ...
分类:
移动开发 时间:
2016-05-28 15:43:30
阅读次数:
630