Latest 1.0.0
Homepage https://github.com/dlfkid/UIExtensionKit
License MIT
Platforms ios 10.0, requires ARC
Frameworks Foundation, UIKit
Authors

UpdateLog

2018-03-08

1.Add More UIImage Category Methods:

+ (UIImage *)generateQRCodeImageViewWithString:(NSString *)dataString;
- (UIImage *)imageWithTintColor:(UIColor *)color;
- (UIImage*)imageWithGrayScale;
- (void)saveImageToSandBox:(NSData*)image withName:(NSString*)imageName;
+ (UIImage*)loadImageFromSandBox:(NSString*)imageName;

for more detail, check the description in UIImageExtension chapter below.

2.Add CocoaPods installation compatible.

Installation

CocoaPods

  1. Add this line to your pod file
    pod 'UIExtensionKit'
  2. Run pod install

  3. import the extenmsion like this
    import <UIExtensionKit/UIImage+UIExtensionKit.h>

Every developer has used such tools to build UI. But neither I don’t want to write them every time I start a project nor I want to use other’s frame work – which usually loaded with some other stuff and not showing what they are unless you look deeply into the header files, so this is it, pure and simple.

Description

All method are implement as categories, So it’s easy to call on use, just remember to import them first, I recommend importing them in your base VC or views, so all the subclasses can save the trouble.

UIColorExtension

alt text

UIImageExension

alt text

NSStringExtension

alt text

Latest podspec

{
    "name": "UIExtensionKit",
    "version": "1.0.0",
    "summary": "Practical method been used in UI Construction.",
    "description": "/**n Convert UIColor to UIImagen n @param color Color to transfern @return UImagen */n+(UIImage*)imageWithColor:(UIColor*) color;nn/**n Convert UIView to UIImagen n @param view view to convertn @return image from viewn */n+(UIImage*)imageWithView:(UIView*)view Translucent:(BOOL)translucent;nn/**n Return sub image from given image to adapt device's screenn n @param image resouce imagen @return subImagen */n+(UIImage *)subFittedImageFromImage:(UIImage *)image;nn/**n Filled given image with colorn n @param color which color you choosed to draw in picturen @return UIImagen */n+(UIImage *)drawColorInImage:(UIColor *)color;nn/**n Rescale imagesn n @param image original imagen @param size size you wanna scale ton @return scaledImagen */n+ (UIImage *)imageScaledFromImage:(UIImage *)image Size:(CGSize)size;nn/**n Get current tint color, if not setted, returns clear color.nn @return UIColorn */n+ (UIColor *)tintColor;nn/**n Set current color as tint colorn */n- (void)setTintColor;nn/**n Set color as tint colorn @param tintColor The tint colorn */n+ (void)setTintColor:(UIColor *)color;nn/**n Convert UIImage to UIColorn n @param pngName name of the Imagen @return UIColorn */n+(UIColor *)colorWithImageName:(NSString *)pngName;nn/**n Convert hexString color into UIColorn n @param hexColor HexString of the colorn @return UIColorn */n+ (UIColor *)colorWithHexString:(NSString *)hexColor;nnn/**n Convert hexString color into UIColornn @param hexColor HexString of the colorn @param alpha Alpha value of the colorn @return UIColorn */n+ (UIColor *)colorWithHexString:(NSString *)hexColor Alpha:(CGFloat)alpha;nnn/**n Get color with RGB Valuenn @param RGBValue RGB valuen @return UIColorn */n+ (UIColor *)colorWithRGB:(CGFloat)RGBValue;nnn/**n Get color with RGB Valuenn @param RGBValue RGB valuen @param alpha Alpha valuen @return UIColorn */n+ (UIColor *)colorWithRGB:(CGFloat)RGBValue Alpha:(CGFloat)alpha;nn/**n Get color with RGB Valuenn @param red Red valuen @param green Green valuen @param blue Blue valuen @return UIColorn */n+ (UIColor *)colorWithR:(CGFloat)red G:(CGFloat)green B:(CGFloat)blue;nnn/**n Get color with RGB Valuenn @param red Red valuen @param green Green valuen @param blue Blue valuen @param alpha Alpha valuen @return UIColorn */n+ (UIColor *)colorWithR:(CGFloat)red G:(CGFloat)green B:(CGFloat)blue Alpha:(CGFloat)alpha;",
    "homepage": "https://github.com/dlfkid/UIExtensionKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "LeonDeng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dlfkid/UIExtensionKit.git",
        "tag": "1.0.0"
    },
    "source_files": "UIColorExtensionDemo/UIColorExtensionDemo/ExtensionKit",
    "requires_arc": true,
    "platforms": {
        "ios": "10.0"
    },
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This