-
Notifications
You must be signed in to change notification settings - Fork 1.1k
iOS 11 Inverted Mode Problem #616
Comments
It’s in the list of things to fix but I encourage everyone to help out. We’re all devs after all. |
My current workaround is using https://github.com/benguild/BGTableViewRowActionWithImage and then adding images instead of text labels like this:
Not that great, but it works. |
Are you inverting the entire table view cell btw? |
Yes, I'm doing |
I'm looking for ways to get the default We also see the same issue, I'll continue the search for a solution. |
Here's workaround , until we find better option This code has to be called on this function |
What doesn't make sense is that the |
not sure why but this code seems to fix it |
Actually that subview added when you try to swipe on cell |
That would explain it. It’s created lazily sincd iOS 11, added to the tableview as subview without inheriting the transformation. Tricky. |
I wonder if we should just deprecate the inverted mode altogether. It was a hacky approach to start with, plus the non-inverted mode has gotten pretty good since the latest releases. |
@dzenbot is it possible to achieve the inverted effect (cells sticking to the bottom) without using inverted mode? |
It is, by making the first cell match the remaining height. That is what we do now on the Slack iOS app, vs inverting the tablview and all its subviews. |
@dzenbot nice to know! Might as well migrate to that. Does SlackTextViewController help with the calculations for remaining height? |
Nop, you will need to handle it on your end since it fully depends on the table view data source. |
@dzenbot If you dont use the inverted flag, how can you load the view with the scroll position starting at the bottom? In iOS 11 you can only set the contentOffset or scroll to the bottom row in viewDidLayoutSubviews, which causes a flicker since the tableview is already loaded. Can't see to find another place to set the contentoffset that works. |
Nevermind, I was able to do it as follows:
Now I am stuck on how to load content to the top of the collectionview while keeping scroll position. What did you mean by "making the first cell match the remaining height" @dzenbot ? |
@alijaza since you're not in inverted mode, your first cell will be up just like normal. if you want to display one cell of type |
Exactly! |
Although there are still known iOS 11 / iPhone X issues, I've pushed 1.9.6 release, which is also available on Cocoapods. At least, we've fixed the most critical issues. Thanks again to all the contributors! 👏 |
@luzian Scherrer I have commented out this line cell.transform = self.tableView.transform in tableview:cellForRowAtIndexPath: and just added self.tableView.transform = CGAffineTransformIdentity; and its working for me. |
@dKasabwala Interesting, I've tried that with iOS 11.4 and iOS 12.0 (Beta) but I cannot get to UISwipeActionPullView. Does your workaround still work for you and are you sure that you are calling the subview search from editActionsForRowAt? |
Description
In iOS 11 (beta 5) in inverted mode the action buttons are displayed upside down.
Reproducible in:
SlackTextViewController version: 1.9.5
iOS version(s): iOS 11 beta 5 / Xcode 9 beta 5
Device(s): any
Steps to reproduce:
The text was updated successfully, but these errors were encountered: