I\'d like to display a temporary message on the iPhone/iPad displaying confirmation of an action, or some quick status about some background activity.
Is there a st
Similar answer to @marco-mustapic's, but without inheritance.
- (void)dismissAlert:(UIAlertView *)alertView
{
[alertView dismissWithClickedButtonIndex:0 animated:YES];
}
- (void)showPopupWithTitle:(NSString *)title
mesage:(NSString *)message
dismissAfter:(NSTimeInterval)interval
{
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:nil
];
[alertView show];
[self performSelector:@selector(dismissAlert:)
withObject:alertView
afterDelay:interval
];
}
To use it:
[self showPopupWithTitle:@"Hi" message:@"I like pie" dismissAfter:2.0];
Throw it into a category on NSObject or something to always have it around.