swift3.0中imageWithRenderingMode

1.Objective-C中

UIImage *image = [[UIImage imageNamed:@"imagePath"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

2.Swift3.0 中

let image = UIImage(named:"imagePath")?.withRenderingMode(.alwaysOriginal)

你可能感兴趣的:(swift3.0中imageWithRenderingMode)