teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

String(Int(stepVal))

2018/08/01 08:17

投稿

takabosoft
takabosoft

スコア8356

answer CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  ```swift
5
5
  tempoLbl = UILabel(frame: CGRect(x: 0, y: 0, width: Int(self.view.frame.width/2), height: Int(self.view.frame.height/10)))
6
- tempoLbl.text = "120"
6
+ tempoLbl.text = String(Int(stepVal))
7
7
  tempoLbl.textColor = UIColor(red: 0.1, green: 0.1, blue: 1.0, alpha: 1.0)
8
8
  tempoLbl.textAlignment = NSTextAlignment.center
9
9
  tempoLbl.font = UIFont.systemFont(ofSize: 72)