Xcode说我不能将类型'Int'指定为'String'类型。我该怎么办?

时间:2017-04-23 08:13:57

标签: swift

@IBOutlet var highScore: UILabel!

override func viewDidLoad() {
  super.viewDidLoad()
  highScore.text = mhighScoreNum
}

1 个答案:

答案 0 :(得分:0)

应该是:

  highScore.text = "\(mhighScoreNum)"

虽然很基本!