You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2019. It is now read-only.
s.summary = "UIViewController category provides iOS7 compatible access to UITraitCollection object by exposing new property mbTraitCollection."
s.description = <<-DESC
Trait collections are new as of iOS 8 and even if they compile with the latest SDK even for deployment targets older than 8.0, their use will cause crash in iOS 7 application. This renders them unusefull until application deployment target is restricted to 8.0.
To solve that problem, I've created a category on UIViewController which exposes a new property mbTraitCollection. When accessing this property a backwards-compatible MBTraitCollection class will be lazy-loaded for you. Class is basically a wrapper around UITraitCollection and will use native behavior when possible (i.e. in iOS >= 8). On older iOS version, this class will use other available techniques to determine device characteristics for you, thus allowing you to use trait collection even on iOS 7.