Check iOS version at runtime?

前端 未结 11 1197
-上瘾入骨i
-上瘾入骨i 2020-12-01 03:03

This is sort of a follow on from my last question. I am using beginAnimations:context: to setup an animation block to animate some UITextLabels. However I notic

11条回答
  •  醉梦人生
    2020-12-01 03:34

    You can use the version of the Foundation framework to determine the current system version.

    if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1){
    
    //for earlier versions
    
    } else {
    
    //for iOS 7
    
    }
    

提交回复
热议问题