cuốn sách gpt4 ai đã làm

ios - 调用 Auth.auth().signOut() 会自动关闭 ViewController

In lại Tác giả: Walker 123 更新时间:2023-11-28 13:50:27 29 4
mua khóa gpt4 Nike

只要我按下按钮调用 signOut 方法,当前 View Controller 就会被đóng cửa。但是,注销过程是成功的。 (我正在使用 FirebaseAuth SDK。)

Đây là mã của tôi:

@IBAction func logoutPressed(_ sender: Any) {
do {
try Auth.auth().signOut()
} catch let signOutError as NSError {
showAlertSaying(
title: "Fehler beim ausloggen",
message: "Ein Fehler ist aufgetreten",
view: self
)
print ("Error signing out: %@", signOutError)
}
}

有什么方法可以防止 View Controller 被关闭吗?

câu trả lời hay nhất

看起来你的 Storyboard按钮链接到除此之外的另一个 Action

@IBAction func logoutPressed(_ sender: Any) {

它有一个 dismiss/pop Action

This scenario happens when you copy elements in storyboard

关于ios - 调用 Auth.auth().signOut() 会自动关闭 ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54700231/

29 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress