Can I expose Swift default parameter values to Objective-C?

前端 未结 1 1698
春和景丽
春和景丽 2020-12-18 22:19

Say I have some Swift class with methods I\'d like to expose to Objective-C:

@objc(Worker) class Worker : NSObject {
    func performWork(label: String = \"R         


        
相关标签:
1条回答
  • 2020-12-18 22:56

    The answer is no, there is currently no way to expose that.

    It is however, being considered for Swift 3.0 (see the proposal here)

    EDIT: This is incorrect as pointed out by Adam S.

    0 讨论(0)
提交回复
热议问题