2015-11-03 43 views

回答

0

看起来你正试图在Swift中使用#warning。这不起作用,#warning只与Objective-C兼容。我想到的唯一的事情是一个注释或在this thread列出的东西,比如从inerrupt答案:

所以我要做的就是声明FIXME()在斯威夫特文件功能:

@availability(iOS, deprecated=1.0, message="I'm not deprecated, please ***FIXME**") 
func FIXME() 
{ 
} 

当我从任何其他函数调用它时,它会显示警告,例如

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int 
{ 
    FIXME()  // Incomplete method implementation. 
    return 0 
} 

对于斯威夫特2使用

@available(iOS, deprecated=1.0, message="I'm not deprecated, please ***FIXME**") 
+1

// FIXME://和TODO:将做的工作。同时... –

相关问题