Created
May 28, 2015 21:13
-
-
Save matan23/6f78dad59f628437eddf to your computer and use it in GitHub Desktop.
ios custom icon tintColor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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