How does iOS 7 implement the UI elements so that they look different depending on what SDK you compile with?
ios, ios7, iphone
Solution
Without going too much into NDA'd territory, I'd just like to state that yes, they are conditionalizing appearance and behavior based off of the result from the following call:
_UIApplicationUsesLegacyUI()
This function, in turn, makes a call to `GSApplicationUsesLegacyUI()`, which I presume returns a result based off of the version of the linked UIKit.
This means that yes, they are conditionalizing parts of UIKit for legacy. Not sure that's a good thing, but that's what they decided to do.
Problem
There are elements like `UITableView`s, `UINavigationBar`s that have a different style on iOS 7. This style is determined at run time, since those classes are implemented on `UIKit`, and `UIKit` is linked with your application dynamically at runtime, not statically at compile time. So one would think that any app run on iOS 7 would have those elements look the way they look on iOS 7. However, they keep the same style they used to have on iOS 6, until you compile with the iOS 7 SDK. Except for some of them (like `UIAlertView` or `UIMenuController`) My only explanation for this is that they do something kind of like this: ``` #define SDKApplicationWasLinkedAgainst ... if (SDKApplicationWasLinkedAgainst < 7.0) ... else ... ``` This is obviously really cumbersome, cause they need to keep maintaining a lot of old code. So I'm curious, is this really what is going on under the hood? What am I missing?