在我第一次在三视图 - 控制调用计时器这样如何从另一个视图控制器调用NStimer形式的一个viewcontroller?
timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(targetMethod) userInfo:nil repeats:NO];
然后定时器称为targetMethod
-(void)targetMethod
{
First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]];
[self presentModalViewController:sVC animated:YES];
[sVC release];
[timer invalidate];
}
首先视图 - 控制开.. 在第一视图控制器有一个button.In按钮操作 我写了
- (IBAction) Action:(id)sender
{
[self dismissModalViewControllerAnimated:YES];
Third *BVC=[[Third alloc]init];
[Bvc TimerStart]; //Timestart is function i start timer in this function..
//i want to call Third viewcontroller timer function this place
}
定时器启动..但视图没有打开(第一个)vi ewcontroller .......
请帮我......
我不明白你想用此BVC对象或什么的那点做什么方法是。你能进一步解释吗? – 2010-06-02 17:59:06