0
我有一個問題,當我點擊我的按鈕,這是負責淡入和淡出我的觀點,淡出動畫不能正常工作,視圖再次出現。淡出動畫循環
觀是在廈門國際銀行文件SETT到「0」阿爾法值
我的代碼:
-(IBAction)startFade:(UIButton*)sender{
UIView *searchView = [UIView safe_cast:[self.view viewWithName:@"searchField"]];
[UIView animateWithDuration:2.f delay:0.f options:UIViewAnimationOptionCurveEaseIn animations:^{
[searchView setAlpha:0.f];
} completion:^(BOOL finished) {
[UIView animateWithDuration:2.f delay:0.f options:UIViewAnimationOptionCurveEaseInOut animations:^{
[searchView setAlpha:1.f];
} completion:nil];
}];
}
嘿感謝您的答案,但沒有,根本不工作 – TamoDaleko
嗯可能必須將alpha值分離出自己的變量,讓我編輯快速和看看它是否有幫助 – Fonix
謝謝你的工作! – TamoDaleko