Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jagatnibas

macrumors regular
Original poster
Jul 28, 2008
126
0
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
 
You can still use the old UITableViewCell methods if you have to run on both OS versions.
 
Code:
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000
// code for 3.0 and later
#else
// code for 2.x
#endif
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.