Waiting for a specified duration in Cocoa

前端 未结 7 2001
生来不讨喜
生来不讨喜 2020-12-29 03:41

Is there a more straightforward way to wait for a specific amount of time in Cocoa than what I have come up with below?

- (void) buttonPressed {
    [self ma         


        
7条回答
  •  暖寄归人
    2020-12-29 03:47

    What's wrong with a simple usleep? I mean, except for the sake of "Cocoa purity", it's still much shorter than other solutions :)

提交回复
热议问题