用户创建的警告在 XCode 7.1 中不再有效。有其他选择吗?

User created warnings no longer working in XCode 7.1. Is there an alternative?

不幸的是,用户创建的警告 pragma#warning 在 Xcode 7.1 中不再适用于我。

这些 # 前缀命令仅在 Objective-C Foundation Headers 中吗?是否有另一种方法来指定它们,或者是否可以将它们与桥接头一起使用?

您似乎正试图在 Swift 中使用 #warning。这不起作用,#warning 仅与 Objective-C 兼容。唯一想到的就是评论或者this thread中列出的东西,比如inerrupt的回答:

So what I do is declare FIXME() function in Swift file:

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

and when I call it from any other function it does show a warning, e.g.

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

For Swift 2 use

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