Is it possibile add UIRefreshControl
at the bottom of the UITableView
?
I would use it to load more data.
Please, Any suggest?
相关问题
- Custom UITableview cell accessibility not working
- UITableViewCell layout not updating until cell is
- Showing a checkmark accessory view move the table
- Setting the inputAccessoryView of a UITextField to
- How to put ActivityIndicator inside UIImage inside
相关文章
- UITableView dragging distance with UIRefreshContro
- Popover segue to static cell UITableView causes co
- TransitionFromView removes previous view
- ios7 new pan gesture to go back in navigation stac
- Navigation bar disappears when typing in UISearchC
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
- Inserting row and deleting row simultaneously. UIT
- Swift Change the tableviewcell border color accord
The following answer is in Xcode 8 and Swift 3.
first declare
than in
viewDidLoad
method write the following code:now finally
override
thescrollViewDidEndDragging
delegate method with following:Use CCBottomRefreshControl in cocoapods,
As it is for language objective. you can add the pod file to your swift project then run it, i have done it, no problem occurs for me
Hope it helps.
Actually the free Sensible TableView framework does provide this functionality out of the box. You specify the batch number and it will automatically fetch the data, displaying the last cell as a 'load more' cell. Once you click that cell, it will automatically load the next batch, and so on. Worth taking a look at.
You can use UIView to customize your refreshControl at bottom. Create UIView and add it to UITableView as footerView.
Hide it:
tableView.tableFooterView.hidden = YES;
Implement UIScrollView delegate -
before adding data to tableView save current offset by
CGPoint offset = tableView.contentOffset;
call reloadData then set previously saved offset back to tableView
[tableView setContentOffset:offset animated:NO];
So that you can feel new data added at bottom.
I've been stuck on the same problem recently and write a category for UIScrollView class. Here it is CCBottomRefreshControl.
This Swift library add pull to refresh to the bottom of
UITableview
.https://github.com/marwendoukh/PullUpToRefresh-iOS
I hope this help you.