1

Sample code:

 self.library = [[ALAssetsLibrary alloc] init];
        self.imageEditor = [[DemoImageEditor alloc] initWithNibName:@"DemoImageEditor" bundle:nil withSize:CGSizeMake(398, 508)];

        self.imageEditor.doneCallback = ^(UIImage *editedImage, BOOL canceled){
            if(!canceled) {
                [popoverController dismissPopoverAnimated:YES];                    photoImg.image = editedImage;
                //[UIImage imageWithCGImage:CGImageCreateWithImageInRect([editedImage CGImage], CGRectMake(0, 0, 398, 508))];
            }
            [imagePicker popToRootViewControllerAnimated:YES];
            [imagePicker setNavigationBarHidden:NO animated:YES];
        };

Warning:

 [popoverController dismissPopoverAnimated:YES];capturing 'self' strongly in this block is likely to lead to a retain cycle
nathanchere
  • 8,008
  • 15
  • 65
  • 86
lorizhan
  • 19
  • 2
  • 2
    possible duplicate of [capturing self strongly in this block is likely to lead to a retain cycle](http://stackoverflow.com/questions/14556605/capturing-self-strongly-in-this-block-is-likely-to-lead-to-a-retain-cycle) – Kurt Revis Jul 08 '13 at 05:29
  • 1
    Or: [this question](http://stackoverflow.com/questions/17009966/capturing-self-strongly-in-this-block-is-likely-to-lead-to-a-retain-cycle), [this question](http://stackoverflow.com/questions/16067712/avoiding-the-capturing-self-strongly-in-this-block-is-likely-to-lead-to-a-retai), or [this question](http://stackoverflow.com/questions/15638751/how-to-fix-capturing-block-strongly-in-this-block-is-likely-to-lead-to-a-reta). Please do a search before asking questions. – Kurt Revis Jul 08 '13 at 05:30

0 Answers0