Latest 0.0.1
Homepage https://github.com/ripperhe/ZYCategory
License MIT
Platforms ios 7.0
Frameworks UIKit
Authors
  • 实用分类

Contents

Examples

UIView

  • UIView+Frame
@interface UIView (Frame)
/** origin、size */
@property CGPoint origin;
@property CGSize size;
/** corner point */
@property (readonly) CGPoint bottomLeft;
@property (readonly) CGPoint bottomRight;
@property (readonly) CGPoint topRight;
/** height... */
@property CGFloat height;
@property CGFloat width;
@property CGFloat top;
@property CGFloat left;
@property CGFloat bottom;
@property CGFloat right;
@property CGFloat centerX;
@property CGFloat centerY;

/** 获取控制器 */
- (UIViewController *)viewController;
/** 根据点移动 */
- (void)moveByPoint:(CGPoint)delta;
/** 放大倍数 */
- (void)magnifyByScale:(CGFloat)scaleFactor;
/** 适配某一个尺寸 */
- (void)fitInSize:(CGSize)size;
/** 圆角 */
- (void)setCornerOnTop:(CGFloat) conner;
- (void)setCornerOnBottom:(CGFloat) conner;
- (void)setCornerOnLeft:(CGFloat) conner;
- (void)setCornerOnRight:(CGFloat) conner;
/** 边框 不要重复设置 */
- (void)setBorders:(ZYBorder)Borders color:(UIColor*) color width:(CGFloat) width;

@end
  • UIView+CreateSubview
@interface UIView (CreateSubview)

/**
 *  遍历创建子控件
 */
- (void)zy_traverseCreateSubviews;

/**
 *  遍历创建子控件 带排除名字数组(仅仅排除当前类,不排除父类)
 *
 *  @param names 属性名数组,属性名前面加上下划线"_"
 *
 *  eg:@[@"_testBtn"]
 */
- (void)zy_traverseCreateSubviewsExceptForNames:(NSArray *)names;

/**
 *  遍历创建子控件 带排除类型数组(仅仅排除当前类,不排除父类)
 *
 *  @return 类型名数组
 *
 *  eg:@[@"UILabel",@"UIButton"]
 */
- (void)zy_traverseCreateSubviewsExceptForTypes:(NSArray *)types;

@end

Latest podspec

{
    "name": "ZYCategory",
    "version": "0.0.1",
    "summary": "A practical cagetory.",
    "homepage": "https://github.com/ripperhe/ZYCategory",
    "license": "MIT",
    "authors": {
        "ripper": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/ripperhe/ZYCategory.git",
        "tag": "0.0.1"
    },
    "source_files": "ZYCategory/**/*.{h,m}",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This