         refresher.addTarget(self, action: #selector(updateDataSource), for: .valueChanged)
         collectionView!.addSubview(refresher)
         
-        
     }
 
     // MARK: User Authentication

    }
    
    @objc func updateDataSource(){
        
        if (Authorization.sharedInstance.token.allKeys.count>0){
            self.refresher.beginRefreshing()
            Post.fetch()
        }

    }

        NotificationCenter.default.addObserver(self, selector: #selector(presentUserLoginControll(notification:)), name: .oAuthDidFail, object: nil)
        NotificationCenter.default.addObserver(self, selector: #selector(presentUserLoginControll(notification:)), name: .oAuthNeedsUserLogin, object: nil)
        
        NotificationCenter.default.addObserver(self, selector: #selector(updateDataSource), name: .tokenDidAuthorize, object: nil)
        
        //notifications for user actions
        NotificationCenter.default.addObserver(self, selector: #selector(didTapImageButton(notification:)), name: .didTapImageButton, object: nil)
 
