开发者

How to show multiple Alerts one after another in iphone app

开发者 https://www.devze.com 2023-01-19 18:46 出处:网络
Hi let me explain briefly. i am developing an iphone application where i have to show multiple UIAlerts one after the another,

Hi let me explain briefly.

i am developing an iphone application where i have to show multiple UIAlerts one after the another, but if i simply use multiple [alert show]; they all show up stacking up to each other. one solution is to sh开发者_StackOverflow社区ow one alert [alert1 show]; then in

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

detect the end of first alert1 then show the second alert by calling [alert2 show]; and so on continue to show other alerts using alertView.

i want to know is there any other way to show multiple alerts in a sequence without the pain of using alertView to detect end of first alert and then show the second one ?


In short, there is no other way. A slight better way might be that you can save the pending alerts in a mutable array and then pop next one (if any) in the delegate so that you don't have to go in a long if-else sequence. You can write your own alert queue in this way.

0

精彩评论

暂无评论...
验证码 换一张
取 消