获取错误实例成员“ testADB”不能在类型“ RequestBuilder”上使用

时间:2019-12-19 12:42:16

标签: ios swift xcode

当我在另一个方法中调用方法时,出现错误:

  

“实例成员'testADB'不能用于'RequestBuilder'类型”

为什么会出现此错误?以及我该如何解决?

class RequestBuilder {
    func testADB() {

    }

    class func getRequestForAddress(_ address: String, headers: [String: String]? = nil, parameters: [AnyHashable: Any]? = nil, httpBody: Data? = nil, httpType: HTTPMethod? = HTTPMethod.GET) -> URLRequest? {

        testADB()

        var request = URLRequest(url: url)
        return request
    }
}

0 个答案:

没有答案