0

I am using autolayout. In xib i have a scrollview as a parent view. Added one view as a subview. For that subview i have added four child elements. Three are views(say view1,view2,view3) and one is label which is having multiline text.

I am using the below code to change the height of the view

@property (strong, nonatomic) IBOutlet NSLayoutConstraint *view1Height;
self.view1Height.constant = 200;

In this case there is no issues with content size the view2 and view3 frames are adjusted automatically.

But while coming to multiline label I am using the below code for setting label text

@property (strong, nonatomic) IBOutlet NSLayoutConstraint *textLabelHeight;
    self.textLabelHeight.constant = expectedLabelSize.height;

But here I am facing issue with scroll content size. Unable to view the entire text. Similarly I want to place one more view below the label how to set constraints for it.

cacau
  • 3,606
  • 3
  • 21
  • 42
user3635384
  • 63
  • 1
  • 8
  • The property doesn't help us much if we don't see how you set it up in IB - a layout constraint consists of more than just the constant.... – cacau Oct 17 '14 at 06:14
  • possible duplicate of [iOS: Multi-line UILabel in Auto Layout](http://stackoverflow.com/questions/12789013/ios-multi-line-uilabel-in-auto-layout) – iYoung Oct 17 '14 at 06:17

0 Answers0