I use a UITableView inside a popover in my iPad app to ask for user input, just like the Contacts app on the iPhone. It has 3 sections, and each section has multiple rows. Clicking on a row brings up a keyboard. When clicking on the bottom row of the bottom section, the keyboard hides the row, and when I scroll the table up, it bounces back down instead of staying scrolled up. On the iPhone Contacts app, the table stays scrolled up, and this is the behavior I want. Any pointers?
It's probably because you are not resizing your table view when the keyboard appears. You should take a look here http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html.
The section "Moving Content That Is Located Under the Keyboard" is what you are looking for.
For your information, a UITableViewController automatically resizes its table view when there is in-line editing of text fields. If it's possible for you, you can just change your class to a UITableViewController and you won't have to worry about resizing.
Related
I am using a UITableViewController with static cells, as a user details form. Everything works, until I tap in one of the cells's text field, the keyboard (or custom inputView) shows up, and you scroll the table down. Cells are then not shown, instead a blank space is shown. Scrolling up and back down then correctly shows them.
If I scroll the tableview down until the "geboortedatum" field shows up,
and press on that textfield, a custom inputView with a date picker shows up:
Now, if I scroll the tableview down, the next rows show up blank:
Two rows are supposed to show up there, like this:
It's not related to the inputView with the date picker, the same happens when the plain old keyboard shows up and you scroll the table down.
I have not overridden any of the tableview delegate or datasource methods apart from showing custom headers (but the problem is the same when I remove that), and am not using UITableViewCell subclasses, just static cells in a storyboard. It seems like an iOS bug to me, but is there any way to work around this?
I think I found the cause and the solution. The problem is that these last 2 cells don't actually fit in the storyboard design:
They are there of course, just not visible by default. If I change the storyboard to freeform with a custom height to make it all fit, like this:
Then the problem doesn't show up anymore. The cells are not hidden anymore on scroll, as before. Very strange.
I have one UITableView where I am adding a header using UITableHeaderView.
The header view is occupying fit to screen in small devices because of its content. And in accessibility it's not moving from table header view to table cell since those cell are not getting visible in screen.
This is working fine in iOS8 but not in iOS9.
I know accessibility post notification should work, but not sure where to fire the notification since there is no way to know that content reading done for table header view.
I would like to answer my own question. I fixed the issue by using accessibilityElementDidBecomeFocused. I checked for last label in header view whenever receives i scrolling table on tab so that other cell could get visible and voiceover can move to next element.
I'm having trouble setting a layout for my iOS app. The entire app is shifted right for some reason as you can see by the label and buttons which are in the middle of the scroll view.
I also can't seem to display the entire table. In the screen shot below "another Item" is supposed to have a checkmark and it is only visible if I shift the table in Main.storyboard far to the left where the actual label for the cell item is half visible.
I have a scroll view inside of the view controller and then a label and three buttons as well as a table view with table view cells.
Thanks to Lucas for the answer
Are you using Auto Layout with that storyboard? Looks like you might not have set your constraints up properly. You might also want to take a look at Xcode's new View Debugging functionality.
I have implemented a UITableView and filled it with a long list of data with sections. With VoiceOver enabled, as the user tries to scroll down the screen to see the cells past the bottom of the screen, the table keeps jumping back to the top and starts reading over again.
I cannot find any reason why it would do this, the table acts as it should with VoiceOver disabled.
Thanks,
Lynn
I want to do something similar to the left UITableView on imdb app on ipad.
Once you have selected an item, it will become the first item on the top and it will dock there. When you flick the list below, it will always be there.
Anyone has any suggestion on how I can achieve that?
That's not part of that UITableView.
It is a seperate UITableView with a custom UITableViewCell that is actually the same as in the UITableView with all the information about the selected film or character ...
When no film is selected, that second UITableView isn't visible. But as soon as you select an item, that UITableView at the top will become visible with the information about the selected item. That means that you will have to reduce the height of the UITableView (with the detail info about that item) so that the UITableView at the top will get some space for being displayed. Everytime you change the item, you need to update the UITableView using the general delegation and datasource methods for a table view. Once there's nothing selected, you just set the upper table view to hidden, and set the other table view's height to the full height.
That's all.