【发布时间】:2015-07-01 00:21:57
【问题描述】:
我正在进行 Obj-C 到 Swift 的转换,但遇到了障碍。调用后出现错误“调用中的参数 #1 缺少参数”
self.tabataTimerUpdated() //error
这个被调用的函数(我转换为 swift)是:
func tabataTimerUpdated(NSNotification) {
self.showTime()
}
这是原始 Obj-C 形式的样子:
- (void)tabataTimerUpdated:(NSNotification *)notification {
[self showTime];
}
我在转换中哪里出错了,我该如何解决?谢谢。
【问题讨论】:
-
提示:Swift 代码中
notification参数在哪里? -
我不知道它在哪里/如何适合,这就是我问的原因。
标签: objective-c swift ios8 xcode6