The UITraitEnvironment document says:
This method is called automatically when the current collection of sign changes. Overriding this method provides you with a way to customize when the collection of features associated with the view changes. If you do not override this method, there will be no special action.
But when I rotate the simulator, this overridden method in my subclass of UIView is not called.
My code looks like this:
override func traitCollectionDidChange(previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
println("______________________________")
}
Did I miss something? Or am I misunderstanding the API document? thanks for shedding light on him.
source
share