How to split Code for iOS 3.0 and iOS 3.2 so I can use MPMoviePlayerViewController if OS 3.2++

前端 未结 2 2077
悲哀的现实
悲哀的现实 2020-12-17 06:00

I have a video that I play. To use full screen in iOS 3.2 I use the MPMoviePlayerViewController (seems to only work with that Class). But if I want to build for iOS 3.0 I ob

2条回答
  •  抹茶落季
    2020-12-17 06:38

    Try this...

    #ifdef IPHONE_OS_3.2
    
    /* iOS 3.2 code */
    
    #endif
    
    #ifdef IPHONE_OS_3.0
    
    /* iOS 3.0 code */
    
    #endif
    

    ...the offending code will get removed before the compiler sees it.

提交回复
热议问题