marty-suzuki / ReverseExtension

A UITableView extension that enables cell insertion from the bottom of a table view.
MIT License
1.68k stars 130 forks source link

Autocorrect-bubble reversed #26

Closed senfi closed 3 years ago

senfi commented 7 years ago

I tried something similar a while ago when implementing a messenger-functionality in our app. We came up with the same idea of reverting the tableview and then reverting the cells. So, the cell at the bottom contained a UITextField to enter the text to the other user. A problem we stumbled upon was the autocorrect-bubble: screen shot 2017-05-10 at 08 02 12 In this example i just added a textfield to the cell to see what happens… if you type in something and autocorrect comes up with some better stuff, the bubble is reversed. We tried to walk through the view-hierarchy to rotate the bubble, but no solution was satisfying... do you have any idea how to take care of this?

marty-suzuki commented 7 years ago

Hi! I guess that it might be solved this issue to turn off autocorrection with autocorrectionType.

senfi commented 7 years ago

This is "avoided", but not "solved" ;)

marty-suzuki commented 7 years ago

This is "avoided", but not "solved" ;)

It's exactly as you said.

I think UITableViewCell that contains UITextField is not a good UI structure in the first place. Because UITableViewCell is reusable, it might be changed that's responder. If you want that, put tapable UILabel to every cell. When receiving UILabel tap event, calculating UILabel's position from tableView's superview. Finally, put UITextField to that position. A UITextFiled appears to be above that UITableViewCell.