Reputation: 4110
I was wandering if it was more correct to dismiss a UIAlertView using:
[alert removeFromSuperview];
Or using:
[alert dismissWithClickedButtonIndex: 0 animated: TRUE];
The first one seems to give problems...
Upvotes: 0
Views: 215
Reputation: 12671
Alert is a popup view so should always be dismissed using [alert dismissWithClickedButtonIndex: 0 animated: YES];
Upvotes: 2
Reputation: 4185
Always use dismissWithClickedButtonIndex. Removing the view from the superview has undefined behaviour - we have no idea what the iOS internals are doing.
Upvotes: 2