uirefreshcontrol

UITableView with UIRefreshControl under a semi-transparent status bar

…衆ロ難τιáo~ 提交于 2019-12-05 00:10:05
问题 I've created a UITableView which I want to scroll underneath my semi-transparent black status bar. In my XIB, I just set the table view's y position to -20 and it all looks fine. Now, I've just added a pull-to-refresh iOS6 UIRefreshControl which works however, because of the -20 y position, it drags from behind the status bar. I'd like it's "stretched to" position to be under the status bar rather than behind. It makes sense why it's messing up but there doesn't seem to be any difference

UIRefreshControl is in wrong position in UITableViewController

梦想与她 提交于 2019-12-04 19:23:00
问题 I've seen quite a few problems with UIRefreshControl, and I'm having a problem as well with my UITableViewController. The problem occurs so randomly and henceforth I cannot figure out why or how it happens. The problem is that sometimes when you scroll down on the tableView, the UIRefreshControl appears in the wrong place, and what seems like above/on top of the tableView itself. I'm attaching a screenshot of what the problem looks like, and also my code used to add the UIRefreshControl and

Implement a horizontal UIRefreshControl

时光毁灭记忆、已成空白 提交于 2019-12-04 16:31:16
How do I go and implement a UIRefreshControl which would get refreshed when pulled from left or right side?? Is it possible with the standard UIRefreshControl? Or is there any API to create this effect? I have been searching a lot to get some lead on this but I am not able to find anything. All I could find is this answer on SO, but it is written in C# which I am not much familiar with. You could use a UITableViewController that is rotated 90 degrees. Add [self.view setTransform:CGAffineTransformMakeRotation(-M_PI / 2)]; in the UITableViewController class during setup. Example using

UIRefreshControl at Bottom of UICollectionView (load more data)

倖福魔咒の 提交于 2019-12-04 15:12:33
I have a UICollectionView which displays images from an online database. I first load 10 images, and then when the user scrolls to the bottom of the UICollectionView I load another 10 images in the background and refresh the view. I accomplish this using the following method : func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) { if (self.localFeedContent != nil && self.localFeedContent!.count > 0) { if indexPath.item == (self.localFeedContent!.count-1) { loadMoreData() } } } Now this works perfectly fine,

Add a UIRefreshControl below a UITableView [duplicate]

我与影子孤独终老i 提交于 2019-12-04 15:04:54
This question already has an answer here: UIRefreshControl at the bottom of the UITableView iOS6? 8 answers Is there any way to add a UIRefreshControl below a UITableView? I created a preview of what I want to achieve. These won't give the UIRefresh Controls but you can add these at the bottom of the Screen Declare below in your header UIActivityIndicatorView *spinner; Initialise the same in ViewDidLoad in your implementation spinner = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease]; [spinner stopAnimating]; spinner

UIRefreshControl: UITableView 'stuck' while refreshing

柔情痞子 提交于 2019-12-04 14:04:59
问题 I'm having a problem implementing UIRefreshControl - in that when you pull down, the 'blob' works perfectly fine and the refresh spinner works fine, but the tableView doesn't scroll up to the spinner whilst refreshing. Instead, it stays where it was until the refreshing is complete, at which point it returns to the top of the screen The code that does the refreshing is: - (void)viewDidLoad { self.refreshControl = [[UIRefreshControl alloc] init]; [self.refreshControl addTarget:self action:

UISearchController changing status bar color on invocation

╄→гoц情女王★ 提交于 2019-12-04 10:45:11
问题 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

How to add refresh control to collection view large titles navigation bar in iOS 11?

耗尽温柔 提交于 2019-12-04 10:23:21
问题 According to Apple the refresh control should be part of the large title navigation bar in iOS 11. The refresh control is part of the navigation bar (on pull to refresh) when I enabled the refresh control in my storyboard for a UITableViewController. I can not do this in storyboard for all other views like UICollectionViewController. When I add a refresh control in code as a subview it is not part of the navigation bar: refreshControl = UIRefreshControl() collectionView?.addSubview

UIRefreshController Ending Animation Issue

末鹿安然 提交于 2019-12-04 09:47:49
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() ? Try this [CATransaction begin]; [CATransaction setCompletionBlock:^{ // reload tableView after refresh control finish refresh animation [self.tableView reloadData]; }]; [self.refreshControl endRefreshing]; [CATransaction commit]; To anyone having this issue, you must call your endRefreshing method before you reload the table data. Otherwise when the table updates it will

Can I use a UIRefreshControl in a UIScrollView?

邮差的信 提交于 2019-12-04 07:35:20
问题 I have about 5 UIScrollView 's already in my app which all load multiple .xib files. We now want to use a UIRefreshControl . They are built to be used with UITableViewControllers (per UIRefreshControl class reference). I do not want to re-do how all 5 UIScrollView work. I have already tried to use the UIRefreshControl in my UIScrollView 's, and it works as expected except for a few things. Just after the refresh image turns into the loader, the UIScrollView jumps down about 10 pixels, which