I want to increase the height of UITableView when user scroll to top and decrease height when user scroll to down. I have done this situation by this code
if scrollView == tableView {
print(scrollView.contentOffset.y)
let height: CGFloat = scrollView.contentOffset.y+200
let maxHeight: CGFloat = self.view.bounds.size.height - 64
let minHeight:CGFloat = 200
if height < maxHeight && height > minHeight {
UIView.animateWithDuration(0.25, animations: {() -> Void in
self.tblHeightCons.constant = height
self.view.setNeedsUpdateConstraints()
})
}
}
https://drive.google.com/file/d/0B9WA3RAMmfrKQlBVOG9NaEllRTQ/view
But i don't want to move contents..