Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize UIView above UITableView

I want to create layout similar to default Weather App in iOS. My view controller has UIView at top and UITableView below it. I want to resize dynamically top view while scrolling table view. I made view controller delegate of table view so I can resize top view while scrollViewDidScroll(scrollView: UIScrollView) is called.

The problem is that I want to disable scrolling of table view while resizing top view. Any ides? Or maybe my approach to this layout is wrong and I should use another one?

like image 599
MichalMoskala Avatar asked Nov 10 '22 20:11

MichalMoskala


1 Answers

I also faced same problem as per mine problem, I used my UIView as a header of table view and used the AutoLayout in my View and if you want to disable the scrolling of your table view you can simply use a block for completion of your view resizing and you can disable scrolling of your table until your block will not give completion. Hope this solution will be helpful for you.

like image 124
Vinod Pandey Avatar answered Nov 14 '22 23:11

Vinod Pandey