Q:

Keep UIScrollView scrolled to bottom

I need somehow to keep scrollview always scrolled to bottom while its height decreases.
It's hard to solve while bounds change animated. Is there some "gravity"-property for purpose like that?

A:

You can achieve this behaviour by using a non-animated version of setContentOffset  within the same animation block you use for resizing the UIScrollView — in this case both changes will be animated simultaneously. Something like:
UIView.animateWithDuration(0.5, animations: { () -> Void in

    let delta: CGFloat = 100

    /// Change UIScrollView's height with some delta value, for instance:
    self.scrollView.frame.size.height -= delta

    /// Update content offset with the same delta value:
    self.scrollView.contentOffset.y += delta
})

