chore: Initial clean commit
- Removed YuMi/Library/ (138 MB, not tracked) - Removed YuMi/Resources/ (23 MB, not tracked) - Removed old version assets (566 files, not tracked) - Excluded Pods/, xcuserdata/ and other build artifacts - Clean repository optimized for company server deployment
This commit is contained in:
65
YuMi/CustomUI/UIImage/UIImage+Utils.h
Normal file
65
YuMi/CustomUI/UIImage/UIImage+Utils.h
Normal file
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// UIImage+Utils.h
|
||||
// YYMobileFramework
|
||||
//
|
||||
// Created by wuwei on 14/6/20.
|
||||
// Copyright (c) 2014年 YY Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
typedef NS_ENUM(NSUInteger, GradientType) {
|
||||
GradientTypeTopToBottom = 0,//从上到小
|
||||
GradientTypeLeftToRight = 1,//从左到右
|
||||
GradientTypeUpleftToLowright = 2,//左上到右下
|
||||
GradientTypeUprightToLowleft = 3,//右上到左下
|
||||
};
|
||||
|
||||
@interface UIImage (Utils)
|
||||
|
||||
- (UIImage *)grayscaleImage;
|
||||
|
||||
- (UIImage *)imageBlendInGray;
|
||||
|
||||
- (UIImage *)imageWithBlendMode:(CGBlendMode)blendMode;
|
||||
|
||||
+ (UIImage *)imageWithColor:(UIColor *)color;
|
||||
|
||||
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
|
||||
|
||||
+ (UIImage *)fixOrientation:(UIImage *)aImage;
|
||||
|
||||
- (UIImage *)imageWithColor:(UIColor *)color;
|
||||
|
||||
- (UIImage *)setCornerWithRadius:(CGFloat)radius andSize:(CGSize)size;
|
||||
|
||||
//异步生成纯色圆角图片
|
||||
- (void)imageWithSize:(CGSize)size radius:(CGFloat)radius backColor:(UIColor *)backColor completion:(void(^)(UIImage *image))completion;
|
||||
/**
|
||||
返回指定大小,颜色,渐变模式的渐变色图片
|
||||
*/
|
||||
+ (UIImage *)gradientColorImageFromColors:(NSArray<UIColor *>*)colors gradientType:(GradientType)gradientType imgSize:(CGSize)imgSize;
|
||||
|
||||
+ (UIImage *)waterImageWithImage:(UIImage *)image waterImage:(UIImage *)waterImage waterImageRect:(CGRect)rect;
|
||||
|
||||
+ (CGSize)sizeWithImageOriginSize:(CGSize)originSize
|
||||
minSize:(CGSize)imageMinSize
|
||||
maxSize:(CGSize)imageMaxSize;
|
||||
|
||||
///裁剪图片
|
||||
- (UIImage *)cutImage:(CGSize)newSize;
|
||||
|
||||
- (UIImage *)cropRightAndBottomPixels:(NSUInteger)pixels;
|
||||
|
||||
-(UIImage *)compressWithMaxLength:(NSUInteger)maxLength;
|
||||
- (UIImage *)roundedImageWithCornerRadius:(CGFloat)cornerRadius size:(CGSize)size;
|
||||
+(UIImage *)getImageFromView:(UIView *)view;
|
||||
+ (NSString *)getImageTypeWithImageData: (NSData *)data;
|
||||
+(UIImage *)getLanguageImage:(NSString *)image;
|
||||
+(NSString *)getLanguageText:(NSString *)image;
|
||||
|
||||
- (UIImage *)resizeTo:(CGSize)size;
|
||||
|
||||
- (UIImage *)imageByApplyingAlpha:(CGFloat)alpha;
|
||||
|
||||
@end
|
Reference in New Issue
Block a user