7

I am developing an iPhone application (iPhone with multi tasking support) in which I am displaying UIAlertView on error. When UIAlertView is about to get display my app is sent to background. Now, if I try to get my app in the foreground, UIAlertView gets displayed for a moment and gets dismissed automatically even if I don't call dismiss/click on any button.

Does anyone knows what the problem is?

Thanks and Regards, Deepa

4

2 回答 2

1

如果通过“呼叫”表示下一个,则 Rajact 答案很好

[theViewWhenYouAddedIt bringSubviewToFront:theViewWhenYouAddedIt.theAlert];

这对我有用,我希望这对某人有帮助

于 2012-04-12T09:55:22.200 回答
1

当您添加警报视图时,它会添加到当前视图控制器的视图之上,并且在返回到前台时,有时会从 xib 重新加载视图并刷新所有内容。我建议您在控制器中维护一个状态变量,该变量在返回前台时再次调用 alertView。

于 2011-11-17T04:23:21.930 回答