-
-
Save gauravds/f9bf7b17063812e3b2dcce16776f362f to your computer and use it in GitHub Desktop.
This file contains 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
- (void)setMaskImage { | |
CALayer *mask = [CALayer layer]; | |
mask.contents = (id)[[UIImage imageNamed:@"infoLogo"] CGImage]; | |
mask.frame = self.imgItem.bounds; | |
self.imgItem.layer.mask = mask; | |
self.imgItem.layer.masksToBounds = YES; | |
self.imgItem.contentMode = UIViewContentModeCenter; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment