         
         return cell
     }
-    
-    //MARK: - UIImagePickerControllerDelegate
+}
+
+extension MomentPostViewController: UIImagePickerControllerDelegate {
     func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
         // Dismiss the picker if the user canceled.
         dismiss(animated: true, completion: nil)

//

import UIKit

class MomentPostViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextViewDelegate {

    //MARK: - Properties
    
    @IBOutlet weak var momentContentTextView: UITextView!
    @IBOutlet weak var momentImageCollectionView: UICollectionView!
    
    var uploadedImages = [UIImage]()
    let addButtonImage: UIImage = #imageLiteral(resourceName: "AddImagePlaceholder")
    let momentTextPlaceholder = "说点什么吧"
    

            present(imagePickerController, animated: true, completion: nil)
        }
    }
}

extension MomentPostViewController: UITextViewDelegate {

    func textViewDidBeginEditing(_ textView: UITextView) {
        if textView.textColor == UIColor.lightGray {
            textView.text = nil
