带参数的分段错误错误

时间:2016-09-23 11:57:23

标签: ios swift

获取分段错误11错误。我已设法将其缩小到方法中的参数(尝试转换为Swift 3)。

func uploadUserAvatar(photo: UIImage?, reachingRate: ((_ rate: Double) -> Void)?, completion: ((_ status: ResponseStatus, _ JSON: AnyObject?) -> Void)?) {

//Some code
}

enum ResponseStatus {
    /**
     Successful request and the server gave a status of 'success'.
     */
    case success

    /**
     The request was unsuccessful or the server did not give a status of 'success'.
     */
    case failure

    /**
     Could not parse the JSON of the response.
     */
    case invalidJSON

    /**
     The user's is not authorized.
     */
    case unauthorized

    /**
     The request timed out.
     */
    case timedOut
}

无法发现问题。有什么建议吗?

0 个答案:

没有答案