gpt4 book ai didi

swift - 对于桥接的 Objective-C 方法,这个 Swift 名称宏中缺少什么?

转载 作者:行者123 更新时间:2023-12-05 01:08:15 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com