第二天学习总结
2015-07-26 00:08
204 查看
1.UILabel
1.text
设置label显示的文本
2.font
字体大小 系统自带样式 /
粗体样式 / 斜体样式
3.textColor
字体颜色
4.backgroundColor
背景颜色
5.lineBreakMode
内容缩进模式
6.numOfLines 0 :自动换行
2.UIImageView
1.frame
初始化的时候直接传一个图片,按照图片的大小设置UIImageView的尺寸
2.结构体.一定要进行强转
CGRect frame = {CGPoint,CGSize} = {{x,y},{width,height}}
3.内容模式
方式一:
UIViewContentModeScaleToFill,//默认情况下
保持与UIImageView的宽高一致
//保持图片的宽高比进行缩放,刚好图片显示完全
UIViewContentModeScaleAspectFit,
//保持图片的宽高比进行缩放,宽或者高度达到吻合就居中显示
UIViewContentModeScaleAspectFill,
UIViewContentModeRedraw,
//牵扯到了核心动画
不用管
方式二:不进行任何拉伸,显示在哪个位置
UIViewContentModeCenter,
UIViewContentModeTop,
UIViewContentModeBottom,
UIViewContentModeLeft,
UIViewContentModeRight,
UIViewContentModeTopLeft,
UIViewContentModeTopRight,
UIViewContentModeBottomLeft,
UIViewContentModeBottomRight,
command +]
代码往后边缩进
4.帧动画
一张一张图片的切换
5.mainBundle :所有资源文件存放的地方:使用[NSBundle
mainBundle]获取
6.缓存 :只要缓存下来的东西都会直接保存到内存
优点:
可以直接访问,不需要加载
缺点:
消耗设备内存,移动端的内存都是特别紧张
7.imageWithContentOfFile:临时的缓存
8.剪掉超出imageView的尺寸 clipsToBounds
1.text
设置label显示的文本
2.font
字体大小 系统自带样式 /
粗体样式 / 斜体样式
3.textColor
字体颜色
4.backgroundColor
背景颜色
5.lineBreakMode
内容缩进模式
6.numOfLines 0 :自动换行
2.UIImageView
1.frame
初始化的时候直接传一个图片,按照图片的大小设置UIImageView的尺寸
2.结构体.一定要进行强转
CGRect frame = {CGPoint,CGSize} = {{x,y},{width,height}}
3.内容模式
方式一:
UIViewContentModeScaleToFill,//默认情况下
保持与UIImageView的宽高一致
//保持图片的宽高比进行缩放,刚好图片显示完全
UIViewContentModeScaleAspectFit,
//保持图片的宽高比进行缩放,宽或者高度达到吻合就居中显示
UIViewContentModeScaleAspectFill,
UIViewContentModeRedraw,
//牵扯到了核心动画
不用管
方式二:不进行任何拉伸,显示在哪个位置
UIViewContentModeCenter,
UIViewContentModeTop,
UIViewContentModeBottom,
UIViewContentModeLeft,
UIViewContentModeRight,
UIViewContentModeTopLeft,
UIViewContentModeTopRight,
UIViewContentModeBottomLeft,
UIViewContentModeBottomRight,
command +]
代码往后边缩进
4.帧动画
一张一张图片的切换
5.mainBundle :所有资源文件存放的地方:使用[NSBundle
mainBundle]获取
6.缓存 :只要缓存下来的东西都会直接保存到内存
优点:
可以直接访问,不需要加载
缺点:
消耗设备内存,移动端的内存都是特别紧张
7.imageWithContentOfFile:临时的缓存
8.剪掉超出imageView的尺寸 clipsToBounds
相关文章推荐
- 『你不知道的位运算,原来还可以这么用』
- Java实现文件的加密与解密
- CSS3属性transform详解之(旋转:rotate,缩放:scale,倾斜:skew,移动:translate)
- 数字三角形
- Google开源库之Volley的初步介绍
- ubuntu下安装和配置tomcat
- 1379 DNA Sorting
- view 添加边框和阴影效果
- DOS基础命令集合
- Redis的持久化机制
- 关于路由器上网设置
- MyEclipse使用Git代码托管服务——02.用ssh连接Git服务
- CSS3 box-sizing属性
- win8 C 盘 突然少了 十几G 空间 原因,解决方法
- 自动生成 JsonFormat! 文档都在scaladoc里。
- BZOJ 2005: [Noi2010]能量采集( 数论 + 容斥原理 )
- 【BestCoder 1st Anniversary】
- redis(一)-概念
- Kafka:分布式消息系统
- java.lang.ClassNotFoundException: org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPIm