How to Keep the Header Cell Moving with the Tableview Cells in Swift 2.0

Swift 2.0 UITableView Section Header scroll to top when tapped

You can use scrollToRowAtIndexPath(_:atScrollPosition:animated:) on the table view to scroll the first row of said section to the top position.

iOS dynamically load new cell to the bottom of a tableview

Check out: How to know when UITableView did scroll to bottom in iPhone
neoneye's answer about - (void)scrollViewDidScroll:(UIScrollView *)aScrollView { was exactly what I was looking for. I moved the method call to fetch more cell right after the NSLog(@"load more rows");

Thank you JiaYow for steering me in the right direction!

Swift How can I load tableViewController and place nth cell on first position but with the ability to scroll up?

You can do it like this:

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

let indexPath = IndexPath(row: 5, section: 0)
self.tableView.scrollToRow(at: indexPath, at: .top, animated: true)
}

Make sure that the row and section is correct.

How to scroll cells only and not the entire tableview?

There is no such controls available in iOS.

Possibly it is a customized UITableView. According to your description, each section of that table will contain another UITableView not simple UITableViewCell. That's why it have the feature you specified.

I had seen some open-source controls with similar feature, but forgot the name of those controls.



Related Topics



Leave a reply



Submit