I am working on an app that supports Apple's voice over accessibility option.
I have a screen with a tableview that has an editing state for the tableview in which the user can swipe and/or tap the red delete button at the beginning of the table view cell to delete the cell.
All of the functionality works fine with voice over turned off, but when I turn voice over on, the delete button is not in the swipe order, nor can you tap it.
Is there something special I need to do to enable the user to tap/swipe the cell while voice over is enabled?
I ended up figuring this out.
Apparently the way the voice over works with editing commands on table view's is that once the cell is highlighted, you can swipe up and down to go through the custom action commands. Once the command you want is spoken, you can double tap the screen to execute the command.
It's a little confusing since the delete button on the cell is never highlighted, which was what was throwing me off.
Related
I have a tableView. The last row of which is the UITextView while the 2 cells above are clickable(Another viewController appears by tapping on them). When I begin editing the textfield a keyboard presents so the upper cells do not fit in anymore and we do not see them.
Then I decide to hide my keyboard by tapping on the background.
The problem is: when I tap on a certain point didSelectRowAt is called. This 'certain' point is any point which appears within the borders of the 2 clickable cells described above.
It seems like after dismissing the keyboard and restoring the initial UI a gesture of touching is recognized and the system thinks that the cell was selected.
Who had experienced this problem before? How can I cope with that bug? Please share your experience
This question is not clear. You get wrong index path selected or you don’t want any selection at all?
When you show keyboard and update UI, you can disable any selection in the table. After you’re done with the keyboard, you can enable it again.
https://developer.apple.com/documentation/uikit/uitableview/1614911-allowsselection
I am working on one tableview and I would like to make animation with defaultly enabled editing style, where all cells would be swiped to left and I would be able to see delete button in all cells and for example after 1 second, I want to go to default state of tableview. It's due to informing user, that some swipe feature is there available.
Has anyone any idea how to implement it? Thanks a lot.
My UITableViewCell has an accessory view of UIButton on the right edge of the cell. However, the button might not be available to an user and thus I shall disable it via self.myButton.enabled = false.
While this makes the cell selection work as usual however, now the selection also reacts to the tap on the button. In other words, while the button is disabled and the user still taps on the button, the tap is now responding to the didSelectRowAtIndexPath: method.
This is not what I want, since it might confuse my users at times. So I want to implement it as follows:
When the button is available, tapping the cell and tapping the button execute different methods respectively (which I implemented and worked).
When the button is unavailable, tapping the cell works only on the part of where the button is not located.
Is it possible to set the functionality here?
I have a problem with the UITableView selection. If I swipe to show the Delete button, and then I tap somewhere else to cancel it, I loses the current selection.
How can I retain my selection by the Table even having done that, or at least know if the Delete button is being dismissed (so that I can manually re-select it)?
That is the default swipe to delete behaviour. There isn't any clean ways to retain the selection after you scroll.
It sounds like what you're trying to do is just to remember a cell selection? In that case, you will need to override the swipe gesture and add your own method. You can store this information any way you like.
As an example, you can check out this project that shows how to handle selections.
I am trying to figure out how to get a hidden button to appear on table cell. Similar to if you were looking at the SMS app on iPhone. The threads are in table cells and if you touch and drag across that cell, a button to delete that thread appears. The functionality in my application is similar.
Now I would like to automate the testing of being able to delete a thread with this method.
target.frontMostApp().mainWindow().scrollViews()[0].tableViews()[0].visibleCells()[0].dragInsideWithOptions({startOffset:{x:0.9, y:0.5}, endOffset:{x:0.0, y:0.5}, duration: 1.5});
The above currently seems to start the intended interaction, but then the UI snaps back as if the action did not happen.
If you run this manually, does the cell stays on one side or does it always snaps back? The reason I ask is because I have a similar UI but I'm able to slide the cell all the way to one side and then tap on the buttons behind it. If you only drag the cell half way, then it will ignore the taps.