1

I have an app that has a custom background for a UITableView. Up to the SDK 3.1.3 this was done by setting the table's backgroundColor property to [UIColor clearColor] and placing the table on top of another view (a UIImageView' for example). SDK 3.2 added thebackgroundViewproperty, and the same effect could be achieved by setting it tonil`.

SDK 4.0 removed all traces of SDK 3.1.x libs, so it is impossible to compile a 4.0-compatible version that still works on 3.1.x devices.

If I create in SDK 3.2 an ad-hoc version and install it via iTunes on a 4.0 device, everything is fine, the app works as expected and the world is happy. If I compile it on the SDK 4.0 it does not, even if I set the target to 3.0 and call setBackgroundColor: (so the compiler doesn't complain about a non-existant symbol).

So, is there any solution for this? I basically want to: - compile with the SDK 4.0 (so I can test the app with a 4.0 device) - make it work on 3.x devices - use 3.1.x symbols, deprecated on 4.0, since the installed base is still huge

Marco Mustapic
  • 3,879
  • 1
  • 21
  • 20
  • You may want to just do a version check when you are drawing your table and use the appropriate code there: http://stackoverflow.com/questions/1964776/determine-current-iphone-os-version-at-runtime-and-compare-version-strings and turn off warnings if they get annoying: http://stackoverflow.com/questions/2622017/suppressing-deprecated-warnings-in-xcode – iwasrobbed Jun 23 '10 at 23:21

1 Answers1

0

Ok, I just weak-link UIKit.framework as stated in this question: Recommended way to support backward/forward compatibility in iPhone app? and conditionally call the appropriate method with UI_USER_INTERFACE_IDIOM()

Community
  • 1
  • 1
Marco Mustapic
  • 3,879
  • 1
  • 21
  • 20