Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func customCell(_ cell: UICollectionViewCell, didPressButton: UIButton, indexPathRow: Int, commentPost: String, commentatorImage: UIImageView, commentatorName: UILabel, comments: UITextView) {
- DispatchQueue.main.asyncAfter(deadline: .now() + 2.0, execute: {
- self.collectionView.reloadData()
- self.postComment(commentatorImage: commentatorImage, commentatorName: commentatorName, comments: comments) })
- }
- override func viewDidLayoutSubviews()
- {
- super.viewDidLayoutSubviews()
- let indexPath = IndexPath(item: 12, section: 0)
- self.collectionView.scrollToItem(at: indexPath, at: [.centeredVertically, .centeredHorizontally], animated: true)
- }
Add Comment
Please, Sign In to add comment