ScrollerView 布局
来源:互联网 发布:象棋教学软件 编辑:程序博客网 时间:2024/05/16 01:25
UIScrollView *Scroller = [[UIScrollViewalloc] init];
Scroller.backgroundColor = [UIColorredColor];
[self.viewaddSubview:Scroller];
UIView *contentV = [UIViewnew];
[Scroller addSubview:contentV];
UILabel *titleL = [[UILabelalloc]init];
titleL.text =@"sasasas";
titleL.textColor = [UIColor blackColor];
titleL.font = [UIFontsystemFontOfSize:14];
titleL.textAlignment =NSTextAlignmentLeft;
[contentV addSubview:titleL];
_titleL = titleL;
UILabel *noticeLabel = [[UILabelalloc] init];
noticeLabel.textColor = [UIColor blackColor];
noticeLabel.font = [UIFontsystemFontOfSize:13];
noticeLabel.userInteractionEnabled =YES;
noticeLabel.text =@"无视无视 ";
[contentV addSubview:noticeLabel];
_noticeLabel = noticeLabel;
__weak__typeof(&*self)weakSelf =self;
[Scroller mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(weakSelf.view);
}];
[contentV mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(Scroller);
make.width.equalTo(Scroller);
}];
[titleL mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(contentV);
make.height.equalTo(@40);
}];
[noticeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(contentV);
make.top.equalTo(titleL.mas_bottom).offset(8);
make.height.equalTo(@40);
}];
[contentV mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(noticeLabel.mas_bottom);
}];
- ScrollerView 布局
- ScrollerView
- scrollerview
- 理解ScrollerView
- scrollerView初探
- Scrollerview xib
- 截取整个ScrollerView视图
- scrollerview 下移64
- scrollerview嵌套listview问题解决
- xibyu约束scrollerview
- RecyclerView和Scrollerview冲突
- 禁止手动滑动ScrollerView
- iOS scrollerView 滚动 工具类
- ios ScrollerView之图片轮播器
- ScrollerView上面加导航控制器
- 【iOS】iOS11.0 ScrollerView 适配
- 用scrollerView实现图片的放大缩小
- ScrollerView实现简单的重复滑动
- MiniGui使用ttf失量字库支持中英文
- 解决OutOfMemoryError: PermGen space tomcat内存溢出,屡试不爽
- 防火墙导致vmware和windows ping不通
- JavaScript中原型链继承的问题
- 20161215随笔
- ScrollerView 布局
- ios 蓝色文件夹和黄色文件夹的区别
- 虚拟"云服务器",达到远程设备间信息数据交互
- Jackson 框架,轻易转换JSON
- 虚拟机安装Oracle Linux 6.6,启动进不了登录界面
- Kotlin语法(十九)-内联函数(Inline Functions)
- Android运行环境Dalvik模式和ART模式的区别
- hibernate注解的有关问题
- MD5加密 加密功能更好的一段代码