2014-03-05 60 views

回答

8

从ViewDidLoad method.ViewDidLoad调用此方法时,您的视图将出现在iPhone设备或Simulator中。

[NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(runMethod) userInfo:nil repeats:YES]; 


    -(void)runMethod 

    { 

    } 
2

像这样的事情

-(void)xyz{ 
     [self performSelectorInBackground:@selector(xyz) withObject:nil]; 
    } 

- (void)viewDidLoad { 
    [self performSelector:@selector(xyz) withObject:nil afterDelay:0.3]; 
} 
+0

非常感谢.... – Vizllx

1

使用NSTimer

NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(xyz) userInfo:nil repeats:YES]; 
相关问题