ppp
ppp

Reputation: 47

How increase UIScrollView height Dynamically with autoLayouts

Here is my structure of views for this

-ViewController
  -UIView
    -UIScrollView
     -UIView * customview

Data comes form web Serivce. automatically increase the UIScrollView Height and subview Height. I am fixing autolayouts to UIScrollView and UIView. In customview UILables and UITableView.

Upvotes: 1

Views: 52

Answers (1)

rohit Sidpara
rohit Sidpara

Reputation: 547

You need to take the Outlet of your customeview height constrains.

@property (strong, nonatomic) IBOutlet NSLayoutConstraint *viewHeight;

bind viewHeight with your customeview height constrains and set the constant property of your outlet

self.viewHeight.constant = 2000; //Your subview Height

in define image you can see the your subview height constrains and bind outlet with this constrains after it height will change dynamically as per your .constant value.

enter image description here

Upvotes: 2

Related Questions