 //            self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Add, target: self, action: #selector(addNewAlbum))
         }
         
-        tableView.tableFooterView?.hidden = isPhotosCanAccess
-
         // Uncomment the following line to preserve selection between presentations
         // self.clearsSelectionOnViewWillAppear = false
 

            let assetFetchResult = PHAsset.fetchKeyAssetsInAssetCollection(collection, options: nil)
             assetGirdVC.assetsFetchResults = assetFetchResult
            assetGirdVC.assetCollection = collection
            
        }
        
    }
}



extension PhotosTVC: PHPhotoLibraryChangeObserver {
    
    func photoLibraryDidChange(changeInstance: PHChange) {
        dispatch_async(dispatch_get_main_queue()) { [weak self] in
            
            var reloadRequired = false
            
            self?.sectionFetchResults =  self?.sectionFetchResults?.map({ (result) -> PHFetchResult in
                let fetchResult = result as! PHFetchResult
                if let changeDetail = changeInstance.changeDetailsForFetchResult(fetchResult) {

class PhotosTVC: UITableViewController {
    var sectionFetchResults:[AnyObject]?
    let sectionLocalizedTitles = ["",NSLocalizedString("Albums", comment: "")]
    var isPhotosCanAccess: Bool = false {
        didSet {
            tableView.tableFooterView?.hidden = isPhotosCanAccess
        }
    }
   
    override func awakeFromNib() {
        PHPhotoLibrary.sharedPhotoLibrary().registerChangeObserver(self)
