Make ur code fit both iPhone SDK 3.0 and 2.0
- 五月 11th, 2009
- 进行评论
Now, we got iPhone SDK beta 5, and we got lots of warning code based on SDK 2.0
step 1,
in ur appname_Prefix.pch add a line
#define TARGET_IPHONE_VERSION 3
step 2,
anywhere you get warring, add :
#if TARGET_IPHONE_VERSION > 2
//code for 3.0
#else
//code for 2.0
#endif
enjoy your no warning compiler
