I have a custom grouped UITableViewCell, with a couple of UILabels on it. Since the UITableViewCell background color used to be pure white, it matched the UILabels\' default
You can call:
[[UIDevice currentDevice] systemVersion]
Although that is discouraged for a lot of reasons, and I'm not sure it's the best way to solve your problem. In principle, you should be able to deploy view code and get the consistent results you want by some other means.
If you do actually want to compare device versions, you'd probably set a property and check the device's OS when the view controller loads, as opposed to within your cellForRowAtIndexPath...