开发者

UIActivityindicator won't be displayed upon Modalviewcontroller

开发者 https://www.devze.com 2023-01-02 15:52 出处:网络
i\'ve created a login screen via a modalviewcontroller. But certainly i have a problem to display a uiactivityindicator once the loginbutton was pressed.

i've created a login screen via a modalviewcontroller. But certainly i have a problem to display a uiactivityindicator once the loginbutton was pressed. Instead the activityindicator seem to be displayed for a minimal period of time, when releasing the mod开发者_JS百科alviewcontroller. Does anyone know the problem. Could anybody help me out? Thanks a lot. Greetz


I've got the solution.

Apple seems to combine animations. So the animation of dismissng the modalview and startanimating function of the uiactivityindicator are combined to one action and the animation of the activityindicator will be never shown.

Simple hack: Just wait with the dismissal of the modalview for a short time e.g.

[self performSelector:@selector(hideLogin) withObject:nil afterDelay:0.1];
0

精彩评论

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