uirefreshcontrol

UISearchController changing status bar color on invocation

旧时模样 提交于 2019-12-03 06:24:44
I have the following code in my app, specifically in viewDidLoad: that sets up my UISearchController . self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.searchController.searchResultsUpdater = self; self.searchController.hidesNavigationBarDuringPresentation = NO; self.searchController.dimsBackgroundDuringPresentation = NO; self.definesPresentationContext = NO; self.searchController.searchBar.scopeButtonTitles = @[]; self.searchController.searchBar.searchBarStyle = UISearchBarStyleProminent; [_tableView setTableHeaderView:_searchController.searchBar]

UIRefreshControl and UITableView's backgroundVIew

房东的猫 提交于 2019-12-03 05:38:07
问题 I have a UITableViewController on which I set a backgroundView. This controller has a UIRefreshControl installed. The problem is that when I set a background view, the refresh control is invisible. If I remove the background view, I can see the refresh control. Am I doing something wrong? 回答1: The reason for this behavior is that in iOS 7, the UITableView 's backgroundView is drawn above the UIRefreshControl . Not sure if this is by design or an issue, but here is a workaround that fixed it

Pull down to refresh data in SwiftUI

大兔子大兔子 提交于 2019-12-03 04:35:13
问题 i have used simple listing of data using List . I would like to add pull down to refresh functionality but i am not sure which is the best possible approach. Pull down to refresh view will only be visible when user tries to pull down from the very first index same like we did in UITableView with UIRefreshControl in UIKit Here is simple code for listing data in SwiftUI . struct CategoryHome: View { var categories: [String: [Landmark]] { .init( grouping: landmarkData, by: { $0.category.rawValue

Load More After Coming to Bottom of UITableView

孤街浪徒 提交于 2019-12-03 03:25:44
问题 For my app I am using a "load more at bottom" property as below. It works fine actually; the only problem is that when a user reaches the buttom, while the load more function is working, to the user it seemes like the app is freezing for a while as there is no animation view like in the UIRefreshcontrol . How can I make the animation showing until the new data is loaded. I found some UIBottomrefreshcontrol properties as separate libraries, but they were all in Objective-c. override func

UIRefreshControl Background Color

不想你离开。 提交于 2019-12-02 22:57:29
Is it possible to make the background of a UIRefreshControl grow as the control grows? I would like to have a colored background for the refresh control to match the top cell's background color. Changing the background color of the tableview is not acceptable because then empty cells at the bottom will also have the color, but I need them to stay white. Apple's mail app shows this behavior. The refresh control's background matches the gray search bar, but empty cells at the bottom of the table view are still the normal white. Here's an example screenshot of how the table looks showing the ugly

How do I programmatically slide the UITableView down to reveal the underlying UIRefreshControl

三世轮回 提交于 2019-12-02 22:13:36
How can I reveal the UIRefreshControl when I update the table programmatically? Using [self.refreshControl beginRefreshing] make the spinner animate but does not reveal it. You'll have to manually change the contentOffset of your UITableView yourself. Be sure to account for the contentInset.top . It should be something as simple as: CGPoint newOffset = CGPointMake(0, -[myTableView contentInset].top); [myTableView setContentOffset:newOffset animated:YES]; Peter Lapisu This will do the trick - (void)beginRefreshingTableView { [self.refreshControl beginRefreshing]; // check if contentOffset is

Load More After Coming to Bottom of UITableView

半城伤御伤魂 提交于 2019-12-02 17:48:36
For my app I am using a "load more at bottom" property as below. It works fine actually; the only problem is that when a user reaches the buttom, while the load more function is working, to the user it seemes like the app is freezing for a while as there is no animation view like in the UIRefreshcontrol . How can I make the animation showing until the new data is loaded. I found some UIBottomrefreshcontrol properties as separate libraries, but they were all in Objective-c. override func viewDidLoad() { super.viewDidLoad() refreshResults() } func refreshResults() { refreshPage = 40 // here the

iOS 11 UIRefreshControl with NavigationBar LargeTitle and SearchController disappearing

风格不统一 提交于 2019-12-01 03:04:21
I have a navigationBar with largeTitle and searchcontroller and my tableView has a refreshcontrol. When I pull to refresh the activityIndicator of refreshcontrol disappear but de refresh process continues, even when the process finish and I call .endRefreshing() of UIRefreshControll the navigationBar doesn't back to the normal size. Someone with the same problem? xxtesaxx I searched a solution for this for weeks already and today, I finally made it work. The solution is so simple, I can't believe I haven't found that earlier. I was using a normal UIViewController with a UITableView. My layout

Give a top inset to UIRefreshControl

北城余情 提交于 2019-12-01 02:44:52
I use an UIRefreshControl like it (without an UITableViewController) : UIRefreshControl *refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(viewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged]; [self.table addSubview:refreshControl]; Problem is the refresh wheel is positioned below the UINavigationController's translucent bar (ios7). There is only a few topic on this problem on StackOverflow. And they didn't bring any valuable solution to me. What I wish is to make my UIRefreshControl's y position 80px down for example. Note : I know it's

iOS 11 UIRefreshControl with NavigationBar LargeTitle and SearchController disappearing

南笙酒味 提交于 2019-11-30 22:17:07
问题 I have a navigationBar with largeTitle and searchcontroller and my tableView has a refreshcontrol. When I pull to refresh the activityIndicator of refreshcontrol disappear but de refresh process continues, even when the process finish and I call .endRefreshing() of UIRefreshControll the navigationBar doesn't back to the normal size. Someone with the same problem? 回答1: I searched a solution for this for weeks already and today, I finally made it work. The solution is so simple, I can't believe