SwiftyComments icon indicating copy to clipboard operation
SwiftyComments copied to clipboard

Reply function?

Open lauriejhouse opened this issue 4 years ago • 2 comments

I was wondering if a reply function/ability is ever gonna be added. Or if you can point me to a resource where I can learn.

lauriejhouse avatar Jul 30 '19 22:07 lauriejhouse

Seems like the example project has some custom cell that has reply a reply button in it. The package is mainly for the table view, not the actually replying, which requires an editor of some sort which is different upon every project. You can use UITextField and stick it at the bottom of the view controller like Reddit and YouTube.

YoomamaFTW avatar Nov 23 '19 03:11 YoomamaFTW

I use this and work good, its a idea

`

let verticalContentOffset = tableView.contentOffset.y; let selectedIndex = self.replyInfoPost.positionChild _currentlyDisplayed.insert(com, at: selectedIndex) var indexPaths: [IndexPath] = [] indexPaths.append(IndexPath(row: selectedIndex, section: 0)) tableView.insertRows(at: indexPaths, with: .bottom)

                              if makeExpandedCellsVisible {
                               //   tableView.scrollToRow(at: IndexPath(row: selectedIndex+1, section: indexPath.section), at: UITableView.ScrollPosition.middle, animated: false)
                                
                                
                                  tableView.setContentOffset(CGPoint(x:0, y:verticalContentOffset), animated: false)
                                
                              }
 `

dan085 avatar Aug 19 '20 02:08 dan085