1

So I have made this app with a hell of a lot UITableViews that started around iOS 4.3.

In the past week I've updated my iPhone to iOS7.0 and when i ran my app (that is currently in development again) and my UITableView backgrounds turned out white instead of the clearcolor that used to work before.

So I've searched google and came to the conclusion that we should now do this color at cellular level. Like in this question: UITableView clear background

I've tried that and it works fine. However when I tried to explain this difference to my co-developers I couldn't figure out a strange behaviour.

During development we used testflight to upload multiple testable versions so we could debug and keep track of the project. During this talk one of my co-developers downloaded the very same app from testflight that was uploaded before I updated my mac to MountainLion, iOS 7.0 and xCode5.0. And when he ran it on his iPhone with iOS7.0, the UITableView backgrounds were clearcolor!

My question is:

How can a version that predates my latest build and was uploaded to testflight ( when I was running Lion, xCode 4.5 ) run differently on a same iPhone device with iOS 7.0, then my currently compiled build ( from MountainLion, xCode 5.0 )?

It doesn't make sense to me. Does anyone know why these 2 builds are working differently from each other? Or am I just going crazy?

Community
  • 1
  • 1
Totumus Maximus
  • 7,543
  • 6
  • 45
  • 69

3 Answers3

1

I did find something similar to this behavior in my application.

The way an application (with exactly the same code) is executed in an iOS 7 device, is different depending on the Xcode version and iOS SDK) it is compiled. I mean, the changed behavior of the uitableview background only appears when you use XCode 5 and iOS 7 to make your app. Using an old Xcode just keep the old behavior (maybe to all the actual applications to be backward compatible)

Xavier Maroñas
  • 3,124
  • 1
  • 14
  • 7
0

Did you make sure to use the old SDK for all targets of your project (e.g. switch from SDK 7.0 to SDK 6.1)? Doing the above made it so that my table views were properly transparent as I had expected. When you build with the new iOS 7 SDK though, it uses the new code which makes several elements behave and appear differently.

Your coworker, who installed the old version of the app, was installing an app that was built using the iOS 6.1 SDK (or possibly an older SDK?), given that it was built with Xcode 4.5

It has nothing to do with what version of Xcode you use to build the project, but rather what settings you use in the newest version of Xcode. If you don't see the iOS 6.1 SDK as a choice for the base SDK, you'll have to either port it over or link it in to Xcode 5 (there are many questions detailing how to do this on Stackoverflow.com)

Doc
  • 1,480
  • 2
  • 16
  • 28
0

Just add this UITableViewDataSource method in you code.

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { [cell setBackgroundColor:[UIColor clearColor]]; }

toxicsun
  • 397
  • 3
  • 12