Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func resizeCell (sender : UIButton) {
- let point = tableView.convertPoint(CGPointZero, fromView: sender)
- if let indexPath = tableView.indexPathForRowAtPoint(point) {
- let moment = moments[indexPath.section]
- let cell = tableView.cellForRowAtIndexPath(indexPath) as! Moment_OPCommentCell
- moment.showFullOPComment = true
- cell.readMoreButton.hidden = true
- cell.OPCommentTextView.textContainer.maximumNumberOfLines = 10
- //cell.OPCommentTextView.sizeToFit()
- //moment.fullTextHeight = cell.OPCommentTextView.frame.height
- tableView.beginUpdates()
- // tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Automatic)
- tableView.endUpdates()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement