點擊按鈕 pushViewController 畫面卡頓,隨後出現多個相同頁面堆疊。
按鈕事件在短時間內被多次觸發(如使用者快速連點、手勢識別器重複、代碼中多處註冊同一事件)。
@property (nonatomic, assign) BOOL isPushing;
- (void)pushNext {
if (self.isPushing) return;
self.isPushing = YES;
[self.navigationController pushViewController:vc animated:YES];
// 動畫完成後重置,或在 viewDidDisappear 重置
}
exclusiveTouch = YES:防止多點觸控同時觸發。