gpt4 book ai didi

Swift 解析进度 block : extra argument in call

转载 作者:行者123 更新时间:2023-11-30 14:17:36 27 4
gpt4 key购买 nike

错误提示:调用中存在额外参数“progressBlock”。怎么了?

pin.saveInBackgroundWithBlock({(success, error) -> Void in
if success == false {
...
} else {
...
}

},
progressBlock: { (amountDone: CInt) -> Void in
var percent = Float(amountDone)
elf.progressIndicatorView.progress = CGFloat(percent)/100

self.progressIndicatorView.reveal()

})

最佳答案

尝试:

 pin.saveInBackgroundWithBlock({ (succeeded: Bool, error: NSError?) -> Void in
// Handle success or failure here ...
if succeeded {
println("Save successful")
} else {
println("Save unsuccessful: \(error?.userInfo)")
}

}, progressBlock: { (amountDone: Int32) -> Void in
var percent = Float(amountDone)
self.progressIndicatorView.progress = CGFloat(percent)/100
self.progressIndicatorView.reveal()
})

关于Swift 解析进度 block : extra argument in call,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30935081/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com