There are a few things at play here.
If I were to implement this, I would first set an observer in my UITableViewController
subclass, observing the UITableView
. More specifically observing the y
position of the tableview or the currently first exposed indexPath
. The header view (the album art, sharing, favorite, ect) would then animate in correlation of the y
position. The alpha of the header view changes here as well. Also changing; how much of the header view is exposed to the user. The headerview is a property of the UITableviewController
, which can be manipulated as the animation progresses. The rate of change could be deduced by a UIGestureRecognizer
s velocity (a tip on that here: Implement velocity in custom UIGestureRecognizer).
As for the navigation bar, I would set the album name as the nav bar title (on presentation) but keep it hidden. When the animation is complete (the y
position is above a certain threshold), set the title of the nav bar to not be hidden.