Xcode 8 Warning “Instance method nearly matches optional requirement”

后端 未结 10 1547
情深已故
情深已故 2020-12-03 05:01

I converted my (macOS) project to Swift 3 in Xcode 8 and I get the following warnings with several delegate methods I implement in swift classes:

Instance me         


        
10条回答
  •  我在风中等你
    2020-12-03 05:22

    After hours of searching I found this - Swift 3 ObjC Optional Protocol Method Not Called in Subclass

    You can workaround the bug by prefixing the objective-c declaration on the function

    @objc(tableViewSettingsDidChange:notification:)
    func tableViewSettingsDidChange(_ notification:Notification)
    

提交回复
热议问题