常用和高级图形操作的实用工具。
DSGraphicsKit 提供了对以下操作的支持,以便快速执行:
使用 CocoaPods
pod 'DSGraphicsKit'
UIView *view;
[view setYRotation:25.0f];
[view addReflectionToSuperLayer];
UIImage *source;
UIImage *fill;
UIColor *color1;
UIColor *color2;
UIImage *icon0 = [source gradientIconWithRGBColors:[NSArray arrayWithObjects:color1, color2, nil]];
UIImage *icon1 = [fill applyAlphaFromImage:source glowWidth:5.0f offset:CGSizeZero color:color1];
UIImage *icon2 = [source iconWithForeground:fill background:[UIColor colorWithWhite:0.1 alpha:1.0] radius:4.0];
UIImage *original;
UIImage *new = [original imageResizedToSize:CGSizeMake(160, 160)
withCornerRadius:24.0f
corners:DSCornerTopLeft | DSCornerBottomRight
transparency:NO];
UIView *view;
[view.layer addPopUpAnimation];