i'm developing an application that allows users to add masks at their photos, the app works well but i noticed a problem, i don't know why but the image loses quality. i'm passing images to view controllers by using this method:
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//SETTO STICKERS
UIGraphicsBeginImageContext(CGSizeMake(_Image.frame.size.width, _Image.frame.size.height));
CGContextRef context = UIGraphicsGetCurrentContext();
[_Image.layer renderInContext:context];
UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
appDelegate.ImageEnded = screenShot;
//Instanzio il viewController della main
LastViewController *VC = [self.storyboard instantiateViewControllerWithIdentifier:@"LastVC"];
//Vado alla main
[self presentModalViewController:VC animated:YES];
and by take the image from the other ViewController using the appdelegate, here is my full app-process:
FirstScreen(ViewController) -> TakePhoto or Select from gallery ->
AddMask(ViewController) -> AddStickers(ViewController) -> LastViewcontroller(ViewController) .