Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Based on documentation I know that I have to create an instance from
- UIGraphicsImageRendererFormat and set its scale to my desired scale but how can I use it???
- UIGraphicsImageRendererFormat * format = [UIGraphicsImageRendererFormat defaultFormat];
- format.scale=1.0;
- UIGraphicsImageRenderer*renderer = [[UIGraphicsImageRenderer alloc]initWithBounds:self.bgImageView.layer.bounds];
- UIImage*image= [renderer imageWithActions:^(UIGraphicsImageRendererContext*_Nonnull myContext){
- [self.bgImageView.layer renderInContext: myContext.CGContext];
- }];
Add Comment
Please, Sign In to add comment