UIAlertController if iOS 8, otherwise UIAlertView

后端 未结 11 2012
清酒与你
清酒与你 2020-12-16 10:19

I want to conform to the UIAlertController used in iOS 8 since UIAlertView is now deprecated. Is there a way that I can use this without breaking support for iOS 7? Is there

11条回答
  •  既然无缘
    2020-12-16 10:53

    // Above ios 8.0
    float os_version = [[[UIDevice currentDevice] systemVersion] floatValue];
    if (os_version >= 8.000000)
    {
          //Use UIAlertController    
    }
    else
    {
         //UIAlertView
    }
    

提交回复
热议问题