gpt4 book ai didi

ios - 在 didSelectRowAt indexPath 函数之外访问 IndexPath.row

转载 作者:行者123 更新时间:2023-11-28 13:33:01 26 4
gpt4 key购买 nike

<分区>

我在 UIViewController 中定义它并尝试在不同的 View Controller 中访问 myIndex。我该怎么做?

我想在没有 Storyboard的情况下以编程方式执行此操作。非常感谢任何帮助!

  func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
//NSLog("You selected cell number: \(indexPath.row)!")
let myIndex = indexPath.row
}

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