我嘗試創建方法並從animateWithDuration返回BOOL類型。但我的對象似乎沒有在完成塊中檢測到。有人可以向我解釋,爲什麼會發生這種情況?如何從animateWithDuration返回BOOL?
+ (BOOL)showAnimationFirstContent:(UIView *)view {
BOOL status = NO;
CGRect show = [SwFirstContent rectFirstContentShow];
[UIView animateWithDuration:DURATION
delay:DELAY
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{ view.frame = show; }
completion:^(BOOL finished) {
status = YES;
}];
return status;
}
感謝提前。
我嘗試你的解決方案和它的工作。謝謝mamnun。 –