ios - How to react to UIControl resize when its data changes -
ios - How to react to UIControl resize when its data changes -
i've built uicontrol subclass display 1-month calendar view on iphone. months require 5 weeks display dates, months need 6, i've built command dynamically resize needed. i'm using uiview animation alter frame of command here. the problem is, need other controls on screen move/resize when calendar changes size. , need happen animation of calendar command changing size. ideally, i'd without coding bunch of details in calendar command other controls on screen. what's best strategy here? hoping somehow anchor other controls frame of calendar command , have platform adjust location/size animates frame change. but, far, can't find combination of struts , springs create happen. do need bite bullet , add together other on-screen controls animation happening within calendar control?
i'll interested see if there improve answers this.
at point, know override setframe
on calendar view , when changes, send setneedslayout
superview.
but i'm not sure if standard views autoresize correctly. geometry flows downwards view tree, not up, , want both.
you may have implement layoutsubviews on containing view.
ios uicontrol
Comments
Post a Comment