Alert view is showing white rectangle in iOS7

后端 未结 3 1471
终归单人心
终归单人心 2020-12-01 12:51

The following code works perfectly from iOS 5 to 6.1. I even have applications in store with that code:

-(void)showActivityIndicator
{
    if(!mLoadingView)          


        
3条回答
  •  无人及你
    2020-12-01 13:25

    I had to fix this problem very quickly, hence I have built an iOS7 UIAlertView-style UIView with its animations, which can be extended with any custom content.

    There might be others who can use my solution, so I made the whole code available on Github.

    enter image description here

    Also, if you want to keep using the UIAlertView under previous OS versions, you have to fork the code. It might be as bad as it sounds, I'm using the following:

    float sysVer = [[[UIDevice currentDevice] systemVersion] floatValue];
    
    if (sysVer < 7) {
      // your old solution
    } else {
      .. // iOS7 dialog code
    }
    

    (Please be aware that this is by no means a real solution - if Apple doesn't want us to use the dialogs for all sorts of things, then we probably shouldn't.)

提交回复
热议问题