您的位置:首页 > 其它

告别恶心的CGRect设置

2014-04-10 13:00 274 查看



FrameAccessor

https://github.com/AlexDenisov/FrameAccessor

Manual Install(手动安装)

All you need to do is drop
FrameAccessor
files into your project, and add
#include "FrameAccessor.h"
to the top of files that will use it.

你需要做的就是把文件夹
FrameAccessor
拖到你的工程当中,然后引入头文件
FrameAccessor.h
即可.

Example Usage

以前你要这么做才能设置frame值,看起来真傻缺!!

CGRect newFrame = view.frame;
newFrame.origin.x = 15.;
newFrame.size.width = 167.;
view.frame = newFrame;

现在你只需要这样子做就行了.

view.x = 15.;
view.width = 167.;


一切尽在不言中......

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: