UIAlertView *alert;
- (IBAction)Open:(id)sender {
alert = [[UIAlertView alloc]
initWithTitle:@”msg” message:@”sss” delegate:self cancelButtonTitle:@”取消” otherButtonTitles:@”確定”, nil];
[NSTimer scheduledTimerWithTimeInterval:5.0f target:self selector:@selector(performDismiss:) userInfo:nil repeats:NO];
[alert show];
}
-(void)performDismiss:(NSTimer*)timer
{
[alert dismissWithClickedButtonIndex:0 animated:NO];
}