         var collectionViewCell: UICollectionViewCell
         
         if indexPath.section == 0 {
-            let asset = self.assetsFetchResults![(indexPath as NSIndexPath).item] as! PHAsset
+            let asset = self.assetsFetchResults![indexPath.item] as! PHAsset
             let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "GirdViewCell", for: indexPath) as! GirdViewCell
             cell.representedAssetIdentifier = asset.localIdentifier
             self.imageManager?.requestImage(for: asset, targetSize: AssetGirdThumbnailSize!, contentMode: .aspectFill, options: nil, resultHandler: { (image, info) in

    }
    
    // MARK: - Actions
    func addVideo(_ sender: UIBarButtonItem) {
        let alertController = UIAlertController(title: NSLocalizedString("Enter the URL for the video you want to save.", comment: "输入你想要保存的视频地址"), message: nil, preferredStyle: .alert)
        alertController.addTextField { (textField) in

    var imageManager: PHCachingImageManager?
    var previousPreheatRect: CGRect?
    var taskManager = TaskManager.sharedInstance
    var longTapGuesture: UILongPressGestureRecognizer?

    override func awakeFromNib() {
        self.setupViews()
