下面是内置反对使用的XCode 6.4Xcode中关闭自动完成问题
NSURLConnection.sendAsynchronousRequest(urlRequest, queue: NSOperationQueue.mainQueue(), completionHandler: { response, data, error in
if error != nil {
println("there be an error")
} else {
let image = UIImage(data:data)
self.webimage.image = image
}
})
如果我兼作XCode的自动完成它,我在此状态下结束单击方法签名的封闭部分IOS 8.4工作代码:
Xcode中并没有把})
在封闭的末端,还增加了-> Void in
。这是Xcode 6.4中的一个错误吗?还是有闭包的两种替代语法?
我什么时候需要completionHandler : { arg, arg arg in
与completionHandler : {(arg,arg,arg) -> Void in //code })
如果可以按照您的需求进行自定义,这是否会对您有所帮助? https://stackoverflow.com/questions/48932152/xcode-auto-complete-for-blocks-within-a-block-and-the-blocks-theyre-in –