I have a simple UIButton in a viewController.
- (IBAction)btnEnter:(id)sender {
..
..
}
Now I want to trigger the button press action programatically one of library functions (didFinishPickingmediaWithInfo) gets executed
- (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info
{
// Do Something
txtBoxAboveEnterButton = @"Data populated successfully";
[self btnEnter:nil];
[reader dismissModalViewControllerAnimated: YES];
}
The function is getting called and the text box above Enter button is getting populated with the dummy text but click is not getting triggered. Please help me out!
The method you are calling is btnEnter with no parameter. It doesn’t look like you have that defined. Try passing a paramter like
nilorselfto it: