Open bercik0291 opened 8 years ago
Hi @bercik0291,
I just pulled your fork and it works very well! Apart from couple of minor issues, great work! I'll see if I can find some time over weekend to refine your PR.
Thank you!
@pronebird Ok, thanks for review, I will fix everything during this weekend
The PR unfortunately does not work with JSQMessagesViewController
. The reload spinner doesn't appear.
Any updates on this? @bercik0291 @pronebird
Hi there,
Any update on this? @bercik0291 @pronebird Would be really cool to have a possibility to do so in this library.
I'll post my workaround as mentioned in #30 here as well:
I'm currently using the following workaround for this.
For my table view:
class UIReversedTableView: UITableView { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.transform = CGAffineTransformMakeScale(1, -1) } }
For my table view cells:
class UIReversedTableViewCell: UITableViewCell { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.transform = CGAffineTransformMakeScale(1, -1) } }
In my view controller (
viewDidLoad
):// Invert infinite scrolling indicator let indicator = UIActivityIndicatorView(activityIndicatorStyle: .Gray) indicator.transform = CGAffineTransformMakeScale(1, -1) self.tableView.infiniteScrollIndicatorView = indicator // Hide repeated lines self.tableView.tableFooterView = UIView()
Looks hacky, but works surprisingly well thus far for me. No need to inverse your data either. 😄
@Flitskikker How does it work without inverting your data? I think that messages supposed to be in reversed order after these operations. Or am I wrong?
@Kacper20 It works by first mirroring the whole UITableView vertically, and then mirroring the individual cells vertically. That way, the order is reversed without altering the data source. Also the scroll direction is reversed, including the infinite scrolling.
The activity indicator is also mirrored, so I create a new already mirrored activity indicator, so that the resulting activity loader will look normal (actually it's mirrored twice).
Why mirror vertically instead of rotating 180 degrees? Then the swipe actions still work normally (from the right hand side)!
Thanks for explanation @Flitskikker. I was meaning, that to maintain old positioning(oldest message "A" first on the list) you'd have to reverse your data source too.(now you have C, B, A).
Cheers,
@Flitskikker @Kacper20 haven't had time to revisit this. This PR has to be refined and merged with existing master.
How to use it? is it merged in current commit?
Hey @pronebird @bercik0291,
Could you please take a look at this and merge it when ready. Or any update on when to expect it?
Thanks in advance!
@sasojadrovski there are issues with this PR and I left comments long ago but I don't think there's been any progress on this since then. :/
add ability to choose direction of infinity scroll (top or bottom).