0
我有一個應用程序通過Oauth登錄到第三方API,但在成功獲取令牌後需要幫助刪除我的授權視圖。以下是我已經得到了IB: 如何解除OAuth視圖?
該應用程序與普通視圖控制器啓動,如果沒有的authToken呈現AuthView:
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
if (myVars.authToken == "") {
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let authVC = storyboard.instantiateViewControllerWithIdentifier("AuthViewController") as! AuthViewController
self.navigationController?.showViewController(authVC, sender: self)
}
你點擊授權,它會打開Safari瀏覽器的URL ,您授權該應用程序,它將返回帶有令牌的回調URL,該令牌返回到authVC顯示的應用程序。但我似乎無法讓我的authVC隱藏。
任何建議將大大appreaciated。