Xcode 8,Swift,NSTimer不可用,在使用时给我错误

时间:2016-10-19 09:30:54

标签: ios swift xcode

我试图在Swift中使用NSTimer代码而Xcode无法识别它。

(image) I have inserted NSTimer code into an Xcode playground file

(image)Xcode does not give me any related code to NSTimer as well

1 个答案:

答案 0 :(得分:1)

NSTimer已在Swift 3中重命名为Timer

var timer = Timer()