I work with iOS 6. I created a custom sub-class of UIView
that has my own layout logic described in overridden layoutSubviews
method. I expect to support both Portrait and Landscape modes so invocation of layoutSubviews
is critical for me. I re-arange and resize sub-views programmatically inside layoutSubviews
without using any constraints.
Everything works fine if I operate with simple controls or UIViews added as sub-views into my custom sub-class. But if I add at least one NIB-based sub-view that has Auto Layout with some constraints then layoutSubviews
is never called on rotation in my sub-class and therefore I can't update the layout.
This is probably something very simple, but I couldn't find the solution here and since I am new to iOS can't figure by myself. Please help.