How to push a modal view from didFinishPickingMediaWithInfo

Posted by Andiih on Stack Overflow See other posts from Stack Overflow or by Andiih
Published on 2010-03-18T12:09:46Z Indexed on 2010/03/18 12:11 UTC
Read the original article Hit count: 706

Filed under:
|

I've got an imagePickerController which allows the user to take or select an image. In - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info; I would like to trigger opening another modal view to capture the caption. I have a call for that purpose...

-(void) getcaption:(id) obj {
    textInput * ti = [[textInput alloc] initWithContent:@"" header:@"Caption for photo" source:2];
    ti.delegate = self;
    [self presentModalViewController:ti animated:YES];
    [ti release];
}

The question is how to call getcaption without triggering a spiral of

#6663 0x324abb18 in -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] ()

At the moment I do

[self performSelector:@selector(getcaption:)  withObject:nil afterDelay:(NSTimeInterval)1];

in didFinishPickingMediaWithInfo which is nasty, and only 95% reliable

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c