Ios 方法';方法()';使用Objective-C选择器';方法';与'的getter冲突;方法';使用相同的Objective-C选择器

Ios 方法';方法()';使用Objective-C选择器';方法';与'的getter冲突;方法';使用相同的Objective-C选择器,ios,objective-c,xcode,swift,Ios,Objective C,Xcode,Swift,自从更新到Xcode 6.3后,我在我的一个扩展上遇到了这个问题。。。对于WKWebView。。特别是在这些功能上 import UIKit import WebKit extension WKWebView: MyWebViewProvider { // Method 'URL()' with Objective-C selector 'URL' conflicts with getter for 'URL' with the same Objective-C Selector

自从更新到Xcode 6.3后,我在我的一个扩展上遇到了这个问题。。。对于WKWebView。。特别是在这些功能上

import UIKit
import WebKit

extension WKWebView: MyWebViewProvider {

    // Method 'URL()' with Objective-C selector 'URL' conflicts with getter for 'URL' with the same Objective-C Selector
    func URL() -> NSURL? {
        return self.URL
    }

    // Method 'canGoBack()' with Objective-C selector 'canGoBack' conflicts with getter for 'canGoBack' with the same Objective-C Selector
    func canGoBack() -> Bool {
        return self.canGoBack
    }

    // Method 'canGoForward()' with Objective-C selector 'canGoForward' conflicts with getter for 'canGoFoard' with the same Objective-C Selector
    func canGoForward() -> Bool {
        return self.canGoForward
    }

    // Method 'evaluateJavaScript(_:completionHandler:)' with Objective-C selector 'evaluateJavaScript:completionHandler:' conflicts with previous declaration with the same Objective-C selector
    func evaluateJavaScript(javascriptString: String!, completionHandler: (AnyObject, NSError) -> ()) {
        self.evaluateJavaScript(javascriptString, completionHandler: { (AnyObject, NSError) -> Void in

        })
    }
}

我怎样才能修好这些?6.2.天气很好。。有点麻烦。

您必须更改函数名,或者如果您需要的话重写这些函数


顺便说一下,应该避免名称冲突。我建议使用类似于
myURL
myCanGoBack()

的方法来更改方法名称。。。你的分机号码