uirefreshcontrol

UIRefreshControl not showing in landscape when in a navigation controller with large titles

我的未来我决定 提交于 2021-02-07 09:16:15
问题 I have a plain UITableViewController embedded in a UINavigationController which prefers large titles . I added a refresh control to my table view controller. On iPhone in iOS 11, if I launch my app in portrait mode, switch to landscape and begin refreshing the table view, the refresh control does not show up . The refresh happens, but the control is just not present. It's not even in the view hierarchy: Note that the same does work on iPhone if I'm in portrait mode, and also on iPad in every

UIRefreshController Ending Animation Issue

懵懂的女人 提交于 2020-02-01 04:54:17
问题 When I call for self.refreshControl.endRefreshing() it snaps the tableView back to it original spot like it should. How should I go about animating it so that it fluently returns to its original spot on endRefreshing() ? 回答1: Try this [CATransaction begin]; [CATransaction setCompletionBlock:^{ // reload tableView after refresh control finish refresh animation [self.tableView reloadData]; }]; [self.refreshControl endRefreshing]; [CATransaction commit]; 回答2: To anyone having this issue, you

UIRefreshControl flicker

佐手、 提交于 2020-01-25 00:41:06
问题 I'm experiencing a kind of flicker with my implementation of UIRefreshControl under iOS 8. Every first time I come to the top of my tableView (meaning when the app has just started) I see the flicker shown in the gif below. This does not happen on any subsequent times I come to the top of the tableView until this view is loaded again, so after I did something in another view of the app or restart it altogether. This is the code in the viewDidLoad() of my application: let refreshControl =

UIRefreshControl not showing spiny when calling beginRefreshing and contentOffset is 0 [duplicate]

邮差的信 提交于 2020-01-11 00:44:07
问题 This question already has answers here : UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController (14 answers) Closed 6 years ago . I am not able to see the loading spinner when calling beginRefreshing [self.refreshControl beginRefreshing]; My UITableViewController subclass uses a UIRefreshControl // refresh UIRefreshControl * refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(refreshTableView)

UIRefreshControl without UITableViewController not calling selector

痞子三分冷 提交于 2020-01-06 13:29:37
问题 I have a UIViewController that has a UITableView as a subview. I am trying to add a pull-to-refresh on the table. Following some examples and discussions that I found here, I have the UIRefresh showing but it never calls the selector. I am not getting notified that the pull action happened. I cannot use a UITableViewController as my main controller as I need to add a fixed button at the bottom of the screen. I have the feeling I am missing something out that hopefully is obvious to someone

`UIRefreshControl endRefreshing` not working

两盒软妹~` 提交于 2020-01-04 05:34:06
问题 I've got a pull-to-refresh feature in my app that is, as far as I can tell, set up the "normal way": UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@"Pull to Refresh"]; [refreshControl addTarget:self action:@selector(refreshPage) forControlEvents:UIControlEventValueChanged]; self.refreshControl = refreshControl; The refreshing part works fine. After it is done refreshing I call [self

UIRefreshControl glitching in combination with custom TableViewCell

試著忘記壹切 提交于 2020-01-03 03:04:39
问题 I'm having a weird issue where an UIRefreshControl is glitching when I use it in combination with an UITableView and custom UITableViewCells . If I use basic ones (set in the inspector panel in Xcode) it works just fine. See GIFs on Imgur. override func viewDidLoad() { super.viewDidLoad() navigationController?.navigationBar.prefersLargeTitles = true refreshControl = UIRefreshControl() refreshControl?.addTarget(self, action: #selector(self.refresh), for: .valueChanged) tableView.refreshControl

UIRefreshControl with low height UICollectionView

好久不见. 提交于 2020-01-02 09:59:19
问题 I have a view which contains another view on the top part, which I'm using to show some basic information. It has about 40% of the total view height. Below that "header" view, I'm using a UICollectionView which is scrollable. Now I've added a UIRefreshControl to my UICollectionView, but refreshing does never occur, because the user can't pull down the UICollectionView that far. When I reduce the height of the top view, it starts working because there's enough space to pull the collectionview

Swift - Disable refreshControl while searching

有些话、适合烂在心里 提交于 2020-01-01 09:24:12
问题 During the search I want to disable the pull to refresh mechanism. So I disabled the refresh control and removed it. But when pull down to refresh the beginRefresh method is called and the cells keep being down for 2 seconds like there is a refresh. func searchBarShouldBeginEditing(searchBar: UISearchBar) -> Bool { resultSearchController.searchBar.selectedScopeButtonIndex = 0 refreshControl!.enabled = false refreshControl?.removeFromSuperview() return true } 回答1: When search then check if

UIRefreshControl bug when entering foreground

随声附和 提交于 2020-01-01 08:04:29
问题 I've noticed a little bug (but really annoying) when I use UIRefreshControl in my View Controller. When the application returns from the background the UIRefreshControl is already loaded and it looks like this: As you can see I use a custom navigation controller which hides like in the Facebook app ( AMScrollingNavBar ). When I reload data in UITableView everything comes back to normal and this bug shows only after returning from the background. This is the code which I use to initialize