Skip to content

Isaaclzg/ISGKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ISGKit

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

ISGKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ISGKit'

Use

  1. 打开你的Xcode工程. 在Supporting Files目录下,选择 File > New > File > iOS > Other > PCH File 然后点击下一步;
  2. 给你的PCH文件起名字TestDemo-Prefix.pch. 例如你的项目工程名为TestDemo然而你的PCH 文件的名字应该为 TestDemo-Prefix.pch,然后创建;
  3. 选择 PCH 文件
  4. 找到 Project > Build Settings > 搜索 “Prefix Header“;
  5. “Apple LLVM 7.0 -Language″ 栏目中你将会看到 Prefix Header 关键字;
  6. 输入: YourProjectName/YourProject-Prefix.pch (如 TestDemo/TestDemo-Prefix.pch );
  7. 将Precompile Prefix Header为YES,预编译后的pch文件会被缓存起来,可以提高编译速度。效果如下image
  8. Clean 并且 build 你的项目.
  9. 在TestDemo-Prefix.pch中引入
#import "ISGCommon.h"

Version 1.3 新增

/**
自动设置居右的label的frame(仅适用父视图的宽度以及最大宽度都是屏幕宽的时候)
*/
+ (CGRect )setRightLabelFrameWithLabel:(UILabel*)label rightX:(CGFloat)x labelY:(CGFloat)y;

/**
自动设置居右的label的frame
*/
+ (CGRect )setRightLabelFrameWithLabel:(UILabel*)label rightX:(CGFloat)x labelY:(CGFloat)y parentWidth:(CGFloat)parentWidth;

/**
自动设置距离父视图右侧label的frame
*/
+ (CGRect )setRightLabelFrameWithLabel:(UILabel*)label rightX:(CGFloat)x labelY:(CGFloat)y parentWidth:(CGFloat)parentWidth maxWidth:(CGFloat)maxWidth;

Author

Isaaclzg, isaac_gang@163.com

简书

License

ISGKit is available under the MIT license. See the LICENSE file for more info.

About

项目常用

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors