ios - Why viewdidlayoutsubviews call multiple times? -
i'm developing ios universal app on swift,using auto layout , support portrait.
i found uiviewcontroller#viewdidlayoutsubviews
called multiple times. instead, viewdidload
call once on starting myapp's uiviewcontroller.
why viewdidlayoutsubviews call multiple times? constraints on each uiview(uibuttons,uitextfields etc..) perform in order?
any information appreciated.
loadview
called one: when view needs loaded.
layoutsubviews
, however, called once per run loop on view has had setneedslayout
or setneedsdisplayinrect
called on - includes whenever subview has been added view, scrolling, resizing, etc.
see this link more information. uses objective-c, information still holds.
Comments
Post a Comment