UITableView - Keep bottom-most cell scrolled to the top?

前端 未结 3 1161
南方客
南方客 2021-01-28 07:43

Im creating a music based app. The playlist screen is a UITableView. It has 3 sections: Previous Tracks, Now Playing, Next Tracks. They are in order as follows:

         


        
3条回答
  •  礼貌的吻别
    2021-01-28 08:40

    Look at the contentInset property which the table view inherits. You will have to set the bottom inset just so that the bottom most cell is visible.

    Example:

    self.tableView.contentInset = UIEdgeInsetsMake(0, 0, self.tableView.frame.size.height - 88, 0);
    

提交回复
热议问题