react-native-navigation的迁移库

1234567891011121314151617
  1. #import "UIImage+tint.h"
  2. @implementation UIImage (tint)
  3. - (UIImage *)withTintColor:(UIColor *)color {
  4. UIImage *newImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
  5. UIGraphicsBeginImageContextWithOptions(self.size, NO, newImage.scale);
  6. [color set];
  7. [newImage drawInRect:CGRectMake(0, 0, self.size.width, newImage.size.height)];
  8. newImage = UIGraphicsGetImageFromCurrentImageContext();
  9. UIGraphicsEndImageContext();
  10. return newImage;
  11. }
  12. @end