- (void)someAction
{
NSTimeInterval timeInterval = 0.5;
NSTimer *showTimer = [NSTimer scheduledTimerWithTimeInterval:timeInterval target:self selector:@selector(timerTest:) userInfo:nil repeats:NO];
}
-(void)timerTest:(NSTimer *)theTimer
{
UIAlertView *timerAlert = [[UIAlertView alloc]initWithTitle:@"timer test!" message:nil delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[timerAlert show];
[theTimer invalidate];
}
-(void)someAction
{
testView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 1024, 768)];
testView.backgroundColor = [UIColor clearColor];
testView.userInteractionEnabled = YES;
[self.view addSubview:testView];
[someThing reloadData];
[NSTimer scheduledTimerWithTimeInterval:1.5f target:self selector:@selector(timerTest:) userInfo:nil repeats:NO];
}
- (void)timerTest:(NSTimer*)theTimer
{
[testView removeFromSuperview];
}