iOS 界面知识

1. 页面常用view  height

状态栏(时间、信号。。那一栏) height 20

navigationBar height 44

tabbar height 49

2. 手机型号 


http://normalhh.com/2016/01/24/iOS及Mac开源项目和学习资料【超级全面】/w


1. 页面常用view  height

状态栏(时间、信号。。那一栏) height 20

navigationBar height 44

tabbar height 49

2.screen size:

3.5 inch 640 * 960px //320 480 @2X

4.0 inch          640 1136 // 320 568  @2X

4.7                  750 1334// 375 667    @2X

5.5                1080 1920// 414 736    @3X

CGAffineTranslation  rotation、scale、tranlate....

@property (nonatomic) CGRect frame;

控件所在矩形框在父控件中的位置和尺寸(以父控件的左上角为坐标原点)。

@property (nonatomic) CGRect bounds;

控件所在矩形框的位置和尺寸(以自己左上角为坐标原点,所以bounds的x\y一般为0)。

@property (nonatomic) CGPoint center;

控件中点的位置(以父控件的左上角为坐标原点)。

frame(修改位置和大小)center(只能修改位置 CGPoint) bounds(只能修改大小) transform(位置、大小、旋转)

OC中不能直接修改一个对象的结构体属性的成员。// self.headButton.frame.y -= 10; is Wrong. 不能直接给成员结构体属性赋值。

CGRect frame = self.headButton.frame;

frame.origin.x -= 10;

self.headButton.frame = frame;//没有动画,直接执行

简易动画的两种方式:

》头尾式

[UIView beginAnimations: nil context: nil];

[UIView setAnimationDuration: 1];

//需要执行动画的代码

[UIView commitAnimations];

》Block式

[UIView animateWithDuration: 0.5 animations: ^{

//需要执行动画的代码

}];

A.

imageNamed 带有缓存,通过imageNamed创建的图片会放到缓存中

当你把图片放在 Images.xcassets 就只能通过imageNamed加载

UIImage  *image = [UIImage imageNamed:imageN];

B.

imageWithContentsOfFile 不带缓存

//圆角

tipView.layer.cornerRadius = 5;

tipView.layer.masksToBounds = YES; //剪裁超过bounds的部分


strong  对象

weak UI控件, 代理对象

assign 基本类型 数值类型 BOOL 结构 枚举

copy 字符串

http://www.cnblogs.com/mjios/

https://developer.apple.com/appstore/contact/appreviewteam/index.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容