gpt4 book ai didi

ios - iOS 应用程序中的 line 有一个线程断点

转载 作者:行者123 更新时间:2023-11-30 12:22:28 24 4
gpt4 key购买 nike

我正在使用 Xcode,我使用的语言是 Swift 3,我在第 39 行“断点”处发现了这个问题

class ViewController: UIViewController {

@IBOutlet weak var NameTextLabel: UILabel!
@IBOutlet weak var ExplainTextLabel: UILabel!
@IBOutlet weak var PriceTextLabel: UILabel!
@IBOutlet weak var FeaturesTextLabel: UILabel!

let Features = ["Features Include: Siri acts as a musicologist, Advanced searches..., Works with Apple Music, etc", " Feautres Include: Up to 18 Cores, Thunderbolt 3, 5k Display, etc",
"Feautres Include: AR technology, I messages wont take up storage, A redesinged appstore, etc", "New Faces, Siri Face, Better Pairing Process"]

let Explain = ["Apple Smart Speaker", "Most Powerfull Mac", "The New OS", "Watch OS4"]

let Price = ["At $349", "At $4999", "Free", "Free"]

let Name = ["Homepod", "iMac Pro", "iOS 11", "Watch OS4"]

@IBAction func MoreDidTap(sender: AnyObject) {

let randomNumber = Int(arc4random()) % 4

let NewName = Name [randomNumber]
let NewExplain = Explain [randomNumber]
let NewPrice = Price [randomNumber]
let NewFeatures = Features [randomNumber]

NameTextLabel.text = NewName
ExplainTextLabel.text = NewExplain
PriceTextLabel.text = NewPrice
FeaturesTextLabel.text = NewFeatures (This line has a thread breakpoint can anyone help)
}

}

最佳答案

我怀疑您是说 Xcode 会在该行停止,即使您没有在该行手动设置断点。

我的猜测是您没有在 Storyboard中连接 FeaturesTextLabel 导出。尝试将 print(FeaturesTextLabel) 放在第 39 行之前。输出是什么?如果为nil,则 socket 未连接。

关于ios - iOS 应用程序中的 line 有一个线程断点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44620479/

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