Auto layout and re-sizing subviews.
Auto layout and re-sizing subviews.
- Subject: Auto layout and re-sizing subviews.
- From: lorenzo <email@hidden>
- Date: Tue, 06 May 2014 16:32:08 -0500
I posted this on SO, but got no answers, so I'm trying here and mabe I
can get some help.:
I have a window into which I horizontally add two subviews. Into each
subview, I place a variable number of subviews made up of a vertical
slider, a text field rotated 90 degrees and placed to the left of the
slider and another textfield, placed just under the slider. The slider
subview's constraints are done in code, the parent views are both done
in IB. When I add more slider views to the left window than the subview
can handle in its default size, it resizes horizontally and forces the
window's content view (and window) to also resize horizontally. Great,
that's just what I want. But if I add more slider subviews than can fit
in the right subview, they just get squeezed together and the subview
does not expand as the left. I layout the slider views using code with
this category converted to support NSViews, instead of UIVews:
UIView+AutoLayout1: https://github.com/jrturton/UIView-Autolayout
The constraints for the left and right subviews are more or less the
same. I can't figure out why the right view does not resize as the left
view does.
Here is a link to a sample project that demonstrates the problem:
http://www.spikesoft.net/wp-content/uploads/2014/05/SliderTest.zip
Can someone point me in the right direction?
Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden