Latest 1.2.4
Homepage https://github.com/JohnnyHooo/HJViewStyle
License MIT
Platforms ios 9.0
Authors

Logo

CI Status
Version
License
Platform

前言

xib零代码和代码快速设置View各种样式,实现阴影圆角并存,渐变色背景等功能❗️

Demo效果

特点

  • xib零代码和代码快速设置View各种样式

  • 阴影和圆角并存

  • 渐变色背景

  • 根据主题色快速设置渐变背景色

安装

支持 Cocoapods 安装

pod 'HJViewStyle'

使用

**所有方法都可以直接看

import "UIView+HJViewStyle.h"

中的声明以及注释。**

    //代码示例
    UILabel *label = [UILabel new];
    label.frame = CGRectMake(100, 100, 100, 100);
    label.backgroundColor = UIColor.redColor;
    label.text = @"代码View";
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor = UIColor.whiteColor;

    label.shadowRadius = 10;
    label.shadowColor = UIColor.whiteColor;
    label.shadowOffset = CGSizeMake(0, 0);
    label.shadowOpacity = 1;

    label.cornerRadius = 20;
    label.borderColor = UIColor.whiteColor;
    label.borderWidth = 10;

    label.gradientStyle = GradientStyleLeftToRight;
    label.gradientAColor = UIColor.redColor;
    label.gradientBColor = UIColor.purpleColor;
    [self.view addSubview:label];

Latest podspec

{
    "name": "HJViewStyle",
    "version": "1.2.4",
    "summary": "A short description of HJViewStyle.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/JohnnyHooo/HJViewStyle",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "JohnnyHooo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JohnnyHooo/HJViewStyle.git",
        "tag": "1.2.4"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "HJViewStyle/Classes/**/*"
}

Pin It on Pinterest

Share This