gpt4 book ai didi

swift - 如何以编程方式访问 View Controller Storyboard ID

转载 作者:可可西里 更新时间:2023-11-01 01:07:34 26 4
gpt4 key购买 nike

我试过 self.view.accessibilityIdentifierstoryboard?.accessibilityAttributedLabel,它们都不包含 Storyboard ID 值。那么呢?

编辑:我找到了这个问题的过时答案,没有任何关于 swift 4 或最近的 xcode 版本

How to know the current storyboard name?

最佳答案

如果您在身份检查器中将“使用 Storyboard ID”设置为"is",这在 ViewDidLoad 中有效:

if let str = self.restorationIdentifier {
//Do something with the View Controller's Storyboard ID
}

关于swift - 如何以编程方式访问 View Controller Storyboard ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54394176/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com