LoginSignup
0
1

More than 3 years have passed since last update.

iOS app の習得日記 (1)

Last updated at Posted at 2020-04-04

こちらの記事を参考に
実習中
(https://qiita.com/gomi_ningen/items/4e0e5bd98f08c4bcf93d)

import UIKit

class ViewController: UIViewController {


    @IBOutlet weak var lable: UILabel!

    @IBAction func buttonOnTouchUpInside(_ sender: Any) {
        let now = Date() // 現在時刻を取得
        let dateFormatter = DateFormatter()
        dateFormatter.locale = Locale(identifier: "ja_JP") // ロケールを指定
        dateFormatter.dateFormat = "yyyy/MM/dd HH:mm:ss" // 時刻表示のフォーマットを指定
        // 指定したフォーマットで現在時刻を取得してラベルに反映させる
        lable.text = dateFormatter.string(from: now)
    }


    }

シミュレーターでトライするも
日付がでない

(https://ediienote.com/Wp_ediieNote/2019/09/21/swiftsignalsgabrt/)

こちらの記事が参考になった。

どうやら 接続を何回もやったようで、
接続先が複数になってた。

一つにもどしたらできた

スクリーンショット 2020-04-05 2.30.04.png

しかし
レイアウトが重なるのはなんでだろう?
xcodeではちゃんと離れているのに、、、

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1