Skip to content

Instantly share code, notes, and snippets.

@matan23
Created May 28, 2015 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matan23/6f78dad59f628437eddf to your computer and use it in GitHub Desktop.
Save matan23/6f78dad59f628437eddf to your computer and use it in GitHub Desktop.
ios custom icon tintColor
UIImage *originalImage = [UIImage imageNamed:@"myiconname"];
UIImage *tintedImage = [originalImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
UIImageView *imageView = [[UIImageView alloc] initWithImage:tintedImage];
imageView.tintColor = [UIColor redColor];
imageView.frame = CGRectMake(?, ?, ?, ?);
[self.view addSubview:imageView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment