PDA

View Full Version : os ver ?




jagatnibas
Jul 3, 2009, 06:58 AM
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



Troglodyte
Jul 3, 2009, 07:37 AM
You can still use the old UITableViewCell methods if you have to run on both OS versions.

JimBobBennett
Jul 3, 2009, 10:05 AM
I had the same question a while ago...

http://forums.macrumors.com/showthread.php?t=699070

PhoneyDeveloper
Jul 3, 2009, 10:09 AM
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000
// code for 3.0 and later
#else
// code for 2.x
#endif