【Swift / Firebase】既存のユーザーがログアウトする時のコード【コピペコード】

2023/06/06に公開
@IBAction func logOutPressed(_ sender: UIBarButtonItem) {
        
    do {
        try firebaseAuth.signOut()
        navigationController?.popToRootViewController(animated: true)
    } catch let signOutError as NSError {
        print("Error signing out: %@", signOutError)
    }
        
}

「Constants.swift ファイル」の中身

struct K {

    static let registerSegue = "RegisterTo〇〇"
    static let loginSegue = "LoginTo〇〇"
    
}

参考教材

iOS & Swift - The Complete iOS App Development Bootcamp
188. Using a Constants File and Understanding the static keyword
https://www.udemy.com/course/ios-13-app-development-bootcamp/

Discussion