uirefreshcontrol

UIRefreshControl with UICollectionView in iOS7

≯℡__Kan透↙ 提交于 2019-11-27 10:57:22
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 shifts for 20-30 points down which results in ugly scroll jump. Tables have this problem too if you

UIRefreshControl on UICollectionView only works if the collection fills the height of the container

懵懂的女人 提交于 2019-11-27 10:17:08
I'm trying to add a UIRefreshControl to a UICollectionView , but the problem is that the refresh control does not appear unless the collection view fills up the height of its parent container. In other words, unless the collection view is long enough to require scrolling, it cannot be pulled down to reveal the refresh control view. As soon as the collection exceeds the height of its parent container, it is pulled down and reveals the refresh view. I have set up a quick iOS project with just a UICollectionView inside the main view, with an outlet to the collection view so that I can add the

UIRefreshControl at the bottom of the UITableView iOS6?

早过忘川 提交于 2019-11-27 08:01:53
Is it possibile add UIRefreshControl at the bottom of the UITableView ? I would use it to load more data. Please, Any suggest? 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)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { float endScrolling = scrollView.contentOffset.y +

UIRefreshControl incorrect title offset during first run and sometimes title missing

倖福魔咒の 提交于 2019-11-27 04:14:25
问题 The text is offset wrong by the first launch of UIRefreshControl... later sometimes the refresh text doesn't show up at all and just the spiny is visible I don't think i had this issue with iOS6... might be related to iOS7 Is in a UITableViewController added as a child to a VC, which resides in a modal presented UINavigationController - (void)viewDidLoad { [super viewDidLoad]; [self setRefreshControlText:@"Getting registration data"]; [self.refreshControl beginRefreshing]; } - (void

Header Displaced in TableView with UIRefreshControl

本秂侑毒 提交于 2019-11-27 02:04:29
问题 My UIRefreshController is doing something odd. When I pull-down refresh, the tableView headers are displaced. If I pull-down it looks fine, but if I scroll down the table while the refresher is still working, the headers are offset by the height of the refresh control while the UITableCells are fine and scroll behind the header. I want to avoid creating a tableViewController, and so I am doing the following in viewDidLoad: _refreshControl = [[UIRefreshControl alloc] init]; [_refreshControl

UIRefreshControl Stuck After Switching Tabs in UITabBarController

拜拜、爱过 提交于 2019-11-27 01:48:02
问题 I have a UITableViewController as the root view controller in a UINavigationController, which is in turn one of the view controllers in a UITabBarController. All hooked up in Storyboard. I've configured the UIRefreshControl for my table in Storyboard as well, and normally it looks like it should when pulling: However, if I switch between my other tabs once or twice, it looks like this: It's not spinning or anything, just stuck "full", and it stays that way until I pull fully and trigger a

UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController

梦想的初衷 提交于 2019-11-26 21:32:09
I've setup a UIRefreshControl in my UITableViewController (which is inside a UINavigationController) and it works as expected (i.e. pull down fires the correct event). However, if I programmatically invoke the beginRefreshing instance method on the refresh control like: [self.refreshControl beginRefreshing]; Nothing happens. It should animate down and show the spinner. The endRefreshing method works properly when I call that after the refresh. I whipped up a basic prototype project with this behavior and it works properly when my UITableViewController is added directly to application delegate

UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController

岁酱吖の 提交于 2019-11-26 07:59:12
问题 I\'ve setup a UIRefreshControl in my UITableViewController (which is inside a UINavigationController) and it works as expected (i.e. pull down fires the correct event). However, if I programmatically invoke the beginRefreshing instance method on the refresh control like: [self.refreshControl beginRefreshing]; Nothing happens. It should animate down and show the spinner. The endRefreshing method works properly when I call that after the refresh. I whipped up a basic prototype project with this

How to use pull to refresh in Swift?

我是研究僧i 提交于 2019-11-26 03:46:36
问题 I am building an RSS reader using swift and need to implement pull to reload functionality. Here is how i am trying to do it. class FirstViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet var refresh: UIScreenEdgePanGestureRecognizer @IBOutlet var newsCollect: UITableView var activityIndicator:UIActivityIndicatorView? = nil override func viewDidLoad() { super.viewDidLoad() self.newsCollect.scrollEnabled = true // Do any additional setup after loading the

UIRefreshControl without UITableViewController

亡梦爱人 提交于 2019-11-26 01:31:28
问题 Just curious, as it doesn\'t immediately seem possible, but is there a sneaky way to leverage the new iOS 6 UIRefreshControl class without using a UITableViewController subclass? I often use a UIViewController with a UITableView subview and conform to UITableViewDataSource and UITableViewDelegate rather than using a UITableViewController outright. 回答1: On a hunch, and based on DrummerB's inspiration, I tried simply adding a UIRefreshControl instance as a subview to my UITableView . And it