Xcode 报告此警告:
parameter of 'swift_name' attribute must be a Swift function name string"
用于以下功能。我不知道我写错了什么。
+ (CGFloat *)feedDetailWithUpdate:(PostUpdate *)update
trackingInfo:(nullable TrackingInfo *)trackingInfo
highlightedComments:(NSArray<FeedComment *> *)highlightedComments
NS_SWIFT_NAME(feedDetailWithUpdate(update:trackingInfo:highlightedComments));
最佳答案
我想通了,参数列表末尾少了一个冒号:
NS_SWIFT_NAME(feedDetailWithUpdate(update:trackingInfo:highlightedComments:));
关于swift - 对于桥接的 Objective-C 方法,这个 Swift 名称宏中缺少什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66214113/