I use UIScrollView
with two tableviews. One of them is dynamic height changed because I insert cells in runtime and the second table is fixed height.
When the application runs and adds cells to the first table everthing is normal and it changed the height of the table and the height of the contentsize of scrollview.
The problem is: when I scroll and scrollViewDidScroll
was called the height of first tableview returns to its initial height and cells were added get nil, the second table view didn't create a problem because its height is fixed.
Note: I used constraints and removed them (the problem remained).
What's the wrong? I use iOS 8 and xCode 6.1.
Thank you for your help!
The problem was solved by add constraints on UITableView
[self addConstraint:[NSLayoutConstraint constraintWithItem:yourButton
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:30.0]];
because I use auto-layout I hope this answer help anyone
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments