review fixes

This commit is contained in:
Николай Ашанин 2016-09-29 18:46:28 +03:00
parent 16b49f217c
commit 49ebd62e60
2 changed files with 2 additions and 2 deletions

BIN
LeadKit/.DS_Store vendored

Binary file not shown.

View File

@ -21,7 +21,7 @@ public extension UIImage {
UIGraphicsBeginImageContextWithOptions(size, false, 0)
let context = UIGraphicsGetCurrentContext()
let colorSpace = CGColorSpaceCreateDeviceRGB()
let colors = gradientColors.map { return $0.CGColor }
let colors = gradientColors.map { $0.CGColor }
let gradient = CGGradientCreateWithColors(colorSpace, colors, nil)
CGContextDrawLinearGradient(context,
gradient,
@ -54,7 +54,7 @@ public extension UIImage {
CGContextDrawImage(context, rect, CGImage)
// Create gradient
let colorSpace = CGColorSpaceCreateDeviceRGB()
let colors = gradientColors.map { return $0.CGColor }
let colors = gradientColors.map { $0.CGColor }
let gradient = CGGradientCreateWithColors(colorSpace, colors, nil)
// Apply gradient
CGContextClipToMask(context, rect, CGImage)