How does iOS 7 implement the UI elements so that they look different depending on what SDK you compile with?

前端 未结 3 881
醉梦人生
醉梦人生 2021-02-02 00:21

There are elements like UITableViews, UINavigationBars that have a different style on iOS 7.

This style is determined at run time, since those

3条回答
  •  轮回少年
    2021-02-02 00:39

    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.

提交回复
热议问题