我不明白为什么这不起作用。我试图在计时器周期被击中时显示 lblstatus :
-(void) viewDidAppear:(BOOL)animated
{
[NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(TimeForPictureCycle)
userInfo:nil
repeats:NO];
}
-(void)TimeForPictureCycle
{
while(YES)
{
[lblStatus setHidden:NO];
sleep(2);
[lblStatus setHidden:YES];
sleep(3);
}
}