uirefreshcontrol

How to customize UIRefreshControl with different image and position?

£可爱£侵袭症+ 提交于 2019-12-18 00:47:13
问题 I have been looking around but couldn't find anything good about this. I would like to customize the default UIRefeshControl with different loader, etc. So far I can only change tintColor & attributedTitle properties and most code I found are just basically creating a new "pulltorefresh" effect but what I want is to just use the UIRefreshControl and customize it a bit. Is this possible? 回答1: You can't add different loader without accessing private APIs, but you can add background image:

UIRefreshControl iOS 6 xcode

爷,独闯天下 提交于 2019-12-17 21:49:07
问题 Does anyone have a short example of how to implement the new UIRefreshControl into xcode. I have a UITableViewController which displays Tweets, want to be able to pull down and refresh. 回答1: You can just set it up in your viewDidLoad , if you have a UITableViewController : UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(refresh) forControlEvents:UIControlEventValueChanged]; self.refreshControl = refreshControl; Then you can

UIRefreshControl with UICollectionView in iOS7

匆匆过客 提交于 2019-12-17 10:19:18
问题 In my application I use refresh control with collection view. UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:[UIScreen mainScreen].bounds]; collectionView.alwaysBounceVertical = YES; ... [self.view addSubview:collectionView]; UIRefreshControl *refreshControl = [UIRefreshControl new]; [collectionView addSubview:refreshControl]; iOS7 has some nasty bug that when you pull collection view down and don't release your finger when refreshing begins, vertical contentOffset

UIRefreshControl at the bottom of the UITableView iOS6?

强颜欢笑 提交于 2019-12-17 09:32:50
问题 Is it possibile add UIRefreshControl at the bottom of the UITableView ? I would use it to load more data. Please, Any suggest? 回答1: I believe there won't be any simple solution to this problem. May be someone could write a separate library to implement this behaviour plus it will cause more complications once you cache data in tableview. But let us break down the problem and that might help you in achieving what you want. I have used the following code to add more rows in the app: - (void

UIRefreshControl not refreshing when triggered programmatically

拜拜、爱过 提交于 2019-12-12 15:54:56
问题 I am trying to show a refresh control right when the view loads to show that I am getting getting data from Parse. The refresh control works as it should when the app is running, but I cannot get it to fire programmatically from anywhere in my app. This is the code that does not appear to run: override func viewDidAppear(animated: Bool) { self.refresher.beginRefreshing() } Not only does this not run, but having the code in the app changes the attributes of the refresh control. When I have

How to customize UIRefreshControl to make pull-down-height lower than default

亡梦爱人 提交于 2019-12-12 10:44:25
问题 In UIRefreshControl in iOS App, I think the default setting is that when I pull down UITableView(UISrollView) by about "100px", refresh begins. I would like to make the above value smaller.(for example, "50px") Is this possible? If possible, please tell me sample codes. 回答1: Try this: // definition extension UIRefreshControl { func refreshManually() { beginRefreshing() sendActions(for: .valueChanged) } } // usage var isRefreshingManually = false func scrollViewDidScroll(_ scrollView:

UIRefreshControl() in iOS 11 Glitchy effect

六月ゝ 毕业季﹏ 提交于 2019-12-12 08:24:26
问题 Every time I pull to refresh the TableView, the UIRefreshControl appears to be glitchy. Below is the code I am using. Any Ideas? In AppDelegate: UINavigationBar.appearance().isTranslucent = false UINavigationBar.appearance().barTintColor = UIColor.red UINavigationBar.appearance().tintColor = UIColor.white In UITableViewController: self.tableView.refreshControl = UIRefreshControl() if #available(iOS 11.0, *) { self.navigationController?.navigationBar.prefersLargeTitles = false } else { //

Is there a horizontal UIRefreshControl?

与世无争的帅哥 提交于 2019-12-12 08:06:57
问题 You can add UIRefreshControl to UICollectionView (or any UIScrollView for that matter) by adding it to collection's subviews: UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged]; [self.collectionView addSubview:refreshControl]; This doesn't work when collection view layout has UICollectionViewScrollDirectionHorizontal. I tried overriding layoutSubviews to put refresh

UIRefreshControl How to detect if a user begins to drag down?

梦想的初衷 提交于 2019-12-12 04:03:29
问题 I have a UIRefreshControl in a UITableViewController . Is there any way I can detect if a user begins to drag the View down to refresh the content? I do not mean the beginRefreshing method. I want to be able to detect when a user begins to drag down - like when the circle fills up before the beginRefreshing method is called. Is this possible? 回答1: As you have implemented UITableViewDelegate protocol you can also implement UIScrollViewDelegate which is called on scroll or drag. Objective C -

Refresh Control - showing above TV

人盡茶涼 提交于 2019-12-12 02:47:11
问题 I'd like to ask you how can I show UIActivityControl under TV cells. This is how it's showed right now. Thanks (self.tableView.refreshControl = self.refresh_control doesn't work ) Code: override func viewDidLoad() { super.viewDidLoad() self.refresh_control = UIRefreshControl() self.refresh_control.attributedTitle = NSAttributedString(string: "Aktualizace") self.refresh_control.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged) self.view.addSubview(self.refresh