Keyboard moves UICollectionView cell off screen - ios

so I have created a UICollectionViewController, made each cell the size of the screen and enabled the function to scroll horizontally between the cells like pages.
My problem is whenever the keyboard comes up (as I plan to populate the cells with some input to get from the user) it pushes the content off the screen.
I am not sure how to stop this, and I have looked online but to no avail. The best I could find is this question also on stackoverflow but it doesn't help.

Related

iOS Accessibility Voice Over not working as expected in table view with tall header view

I've got a table view which is displaying detail information about a session at a conference (think WWDC or Google I/O). The bulk of the information is in a flexible-height header view, but there is a need to link to an arbitrary number of speakers and related sessions. This is accomplished with individual table view cells. So the structure of the page is a very tall header (over 1000pt), followed by lists of speakers and other sessions in cells.
The problem I'm encountering is getting accessibility voice over to work properly: when you advance the voice over down the content to the bottom of the header view, the first cell hasn't dequeued yet. Since the cell and its content don't exist, the voice over targeting just jumps to the tab bar at the bottom of the screen. If you manually scroll the table view down so that the first cell is visible, then turn on voice over, the stepping works as expected, since every cell is pulled up high enough to cause the next cell to dequeue.
How can I cause the voice over accessibility stepping to cause the table cells to begin dequeueing so that voice over continues all the way to the bottom of the dynamic content?
There may be a more correct way to do this, but at the suggestion of a co-worker, I tried making the table view taller than the header in viewDidAppear and set the content and scroll indicator insets so that it still looks like it did before. This has the effect of forcing the cells to begin dequeueing immediately, which allows voice over to flow all the way through the content.

IOS UICollectionView with Paging Enabled pushed off center

I have a collection View that is horizontally scrolling. I checked off paging enabled in storyboard. Everything is working fine however when i scroll through the cell on the first and last cell i can scroll just a little extra and move the cell off center. Does anyone know how to fix this?
EDIT
I added a screenshot, the cell is the gray and the white is the collection view background, that acts as a page and when i drag it just a little that the whit is gone that acts as its own page as well, however the cells that arent first or last dont have this issue

UITableView Show a "loading spinner" when scrolled passed bottom

I would like to show a "spinner" at the bottom of my table (like the current Twitter iPhone App) when my users scroll passed the last cell in my table.
I thought about adding a static cell and adding 1 additional row to show the cell at the bottom, however, I think this is going to look crappy if I only have, say, 2 cells.
I looked through a bunch of Google searches, however, I didn't really see an answer. I thought about pulling up a "loading view" once my scroll view for the table reached a certain point, however, I think I may be over-thinking the situation.
Any help or direction would be awesome... thanks.
I would recommend that you add a UIActivityIndicator to a view and set that view as the UITableView's footer view.

iOS UICollectionView not scrolling when cell is touched

I've created a simple grid based UICollectionView but I'm having trouble with the scrolling. If I touch the view itself rather than a cell within it then it seems to scroll correctly but if I touch one of the cells and try to scroll then nothing happens. This is a bit of an issue, as I basically want the grid of cells to completely fill the view, and when the view is filled like that there is nowhere to touch that will actually make it scroll! I guess the easiest way to describe what I'm trying to achieve is a table view but with two columns of cells rather than one.
I can't seem to find anything in the documentation that talks about this issue and I've tried various combinations of "user interaction enabled" settings etc.
One final thing, I do require the cells to respond to a single tap touch (basically to toggle them on and off) so I don't want to completely disable them responding to touches.

UITableView Section Headers not visible when table in visible rect

I have a UIScrollView with 3 UITableViews stacked horizontally. I switch between these tableviews using a tab-controller on top. However, when I switch to the 2nd or 3rd tab and switch back quickly to 1st the section headers don't show. They display when I scroll the tableView. These are custom headers (jfyi). I tried calling setNeedsDisplay when the tableView is visible, but that does not help because as per Apple Docs :
If you simply change the geometry of the view, the view is typically not redrawn. Instead, its existing content is adjusted based on the value in the view’s contentMode property. Redisplaying the existing content improves performance by avoiding the need to redraw content that has not changed.
Since, only the geometry of the view is changing here, it does not help. Also this happens on all versions iOS 5~6.1 and on simulator and device. Thankfully, this does not crash the app, but its a problem nevertheless. Could someone help? I am attaching pictures for reference. First shows the problem, second: after scrolling the "head(er)less" tableview
EDIT:
I am using simple scrollRectToVisible:animated: to switch between tableviews. This does the trick but I just observed that when I set ...animated:NO all is okay. The problem happens when ...animated:YES
It seems the issue of displaying and scrolling taking place simultaneously for the respective tableview. So what you can do here is:
Remove the scroll animation
or
Just scroll the tableview to top on the tab press event
or
simply reload the tableView which is made visible

Resources