Is it possible to NOT dismiss a UIAlertView

前端 未结 5 2076
礼貌的吻别
礼貌的吻别 2020-11-30 09:42

The UIAlertviewDelegate protocol has several optional methods including:

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonInd         


        
5条回答
  •  猫巷女王i
    2020-11-30 10:21

    willPresentAlertView:, didPresentAlertView:, alertView:willDismissWithButtonIndex:, and alertView:didDismissWithButtonIndex: are for tracking the start and end of UIAlertView's animations.

    Applications that don't need to track UIAlertView's animations can simply use alertView:clickedButtonAtIndex:. The docs for that method say "the receiver is automatically dismissed after this method is invoked."

提交回复
热议问题