1
如何禁用從被壓一個UIButton ... 而我顯示5秒的圖形?如何在5秒內顯示圖形時禁用按鈕?
self.view.userInteractionEnabled = NO; // if you need the whole view disabled
//self.btn.enabled = NO; //if you need button only disabled
[UIView animateWithDuration:3.0f animations:^
{
// your graphical changes
[(UILabel*)addLbl[1] setBackgroundColor:[UIColor redColor]];
}
completion:^ (BOOL finished)
{
self.view.userInteractionEnabled = YES;
//self.button.enabled = YES;
[(UILabel*)addLbl[1] setBackgroundColor:[UIColor whiteColor]];
}
];
的代碼段後,我把另一個圖形,但是,執行將不會顯示臨時圖形,當我把在該代碼段 – jdl
如果您需要在一行幾動畫序列,像頭後其他圖形:門打開;第二:一個男人走過門 - 然後嘗試把你的其他動畫放在第一個動畫的完成塊內。讓我知道,如果這聽起來很清楚。 – Eugene
我這樣做,並且該塊之後......結果是,臨時圖形從未顯示 – jdl