在这段代码中,似乎睡眠发生在隐藏按钮之前.这是为什么?
-(void)buttonPressed{
NSLog(@"Button pressed!");
button.hidden=true;
sleep(rand()%10);
NSLog(@"out of sleep!");
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
228 次 |
| 最近记录: |