【发布时间】:2018-04-02 08:01:24
【问题描述】:
我有使用 Swift 3.2 和 Objective-C 编译 Xcode 版本 9.0 (9A235) 的项目。它在 Swift 3.2 中编译得很好。但是,当我切换到 Swift 4.0 时,在 Swift 中声明的方法在 Objective-C 中不再可见。错误是No visible @interface "UserAPI" declares the selector ...
【问题讨论】:
-
很可能是 stackoverflow.com/questions/46829032/… 和 stackoverflow.com/questions/44390378/… 的副本 - 将
@objc添加到要向 Objective-C 公开的成员中。
标签: objective-c swift xcode compiler-errors swift4