I have a block completion being called from within a button press message and, depending on state, optionally a UIAlertView
being displayed. However, when invoked the UIAlertView
appears three (3) times...
- With the full information but it disappears itself and shows
- Just the title shows and when I click OK
- Appears again with full information (as in #1) for which I have to dismiss again
Following is a snippet of the code:
[credential performDataOperation:[credential commandForCreateOnClass:self.className]
withArguments:edits
completionBlock:^(BOOL succeded, id before, id after, NSDictionary *arguments, NSError *error) {
if (succeded) {
self.object = after;
self.objectWasCreated = YES;
[self prepareEditsDictionary];
self.navigationItem.rightBarButtonItem.enabled=NO;
}
else {
errorRecieved = YES;
[[[UIAlertView alloc] initWithTitle:@"Error" message:@"Error Message" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}
}];