os ver ?

Discussion in 'iOS Programming' started by jagatnibas, Jul 3, 2009.

  1. jagatnibas macrumors regular

    Joined:
    Jul 28, 2008
    #1
    I have a 2.2.1 code where i use cell.text = @"blah"

    i upgraded to 3.0

    Now I will have to do cell.textlabel.text = @"blah"

    the thing is, is there any macro defined to build appropriate to versions of sdk ?

    something like

    #if __OS_VERSION__ == 3.0
    // use this
    #elif __OS_VERSION__ == 2.2.1
    // use that
    #else
    // use none

    regards
     
  2. Troglodyte macrumors member

    Joined:
    Jul 2, 2009
    #2
    You can still use the old UITableViewCell methods if you have to run on both OS versions.
     
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Code:
    #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000
    // code for 3.0 and later
    #else
    // code for 2.x
    #endif
     

Share This Page