告别恶心的CGRect设置

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.;

 

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

告别恶心的CGRect设置

相关文章:

  • 2022-12-23
  • 2021-12-14
  • 2021-09-08
  • 2022-01-22
  • 2022-12-23
  • 2021-12-07
  • 2021-05-02
  • 2021-12-31
猜你喜欢
  • 2021-12-09
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
相关资源
相似解决方案