0
捕捉例如自救,我有以下控制器:一吸氣劑在財產中塊
class MyController : UIViewController
{
var capturedProperty : Property?
func getterForCapturedProperty() -> Property?
{
return capturedProperty
}
func viewDidAppear()
{
NetworkOperationBlock{
someResult -> Void in
self.getterForCapturedProperty().result = someResult
}
}
}
現在即使我想,做一個getter,在物業不應該影響自己是否被捕獲或不,但我仍然不確定。
有人可以在這個例子中快速解釋一下嗎?