IOS学习之自动布局UIScrollView+UILabel
来源:互联网 发布:三星网络电视官网 编辑:程序博客网 时间:2024/05/02 09:04
1.效果图
2.View层级
UIView ==> UIScrollView ==> UIView ==> UILabel
注意:1.UIScrollView里需要放一个UIView
2.UIScrollView里UIView高度错误问题到Label自动布局完自动OK
3.代码
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UILabel *label;@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; NSMutableString *mutableString=[[NSMutableString alloc]init]; for(int i=1;i<=48;i++){ [mutableString appendFormat:[NSString stringWithFormat:@"%@.%@\n",[NSString stringWithFormat:@"%d",i],@"=====测试测试====="]]; } _label.text= [mutableString substringToIndex:[mutableString length]-1];}- (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning];}@end
0 0
- IOS学习之自动布局UIScrollView+UILabel
- IOS UIScrollView的自动布局
- IOS UIScrollView的自动布局
- IOS学习之UILabel
- iOS 自动布局 两个UILabel 迷思
- IOS学习之UIScrollView
- IOS UIScrollView 自动布局的 滚动问题
- IOS开发—UIScrollView自动布局
- iOS学习之VFL实现自动布局
- iOS 自动布局框架学习之Masonry
- IOS控件学习之UILabel
- iOS之UI学习-UILabel
- iOS学习笔记之-UIScrollView
- UIScrollView添加自动布局
- UIScrollView自动布局
- UIScrollView的自动布局
- IOS之UILabel显示内容自动换行
- IOS之UILabel显示内容自动换行
- POJ 2676 Sudoku
- bzoj1187【插头dp】
- HDU2111 Saving HDU
- webview加载网页,tel协议不会调出拨号盘?该如何处理
- 获取文件的后缀名 .jpg或者jpg都可以
- IOS学习之自动布局UIScrollView+UILabel
- PHP设计模式-单例模式
- Ionic学习笔记
- UIPopupList 打开的选择窗口被其它图层遮挡
- nodejs中exports与module.exports的区别详细介绍
- InetAddress的使用
- 360浏览器以最高级模式渲染代码
- How to represent ROC curve when using Cross-Validation
- js 实现获取name 相同的页面元素并循环遍历