6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

swift による hello, world

Posted at

山程作成されてるんでしょうねえ…

ViewController.swift
//
//  ViewController.swift
//  HelloWorldApp
//

import UIKit

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        
        var label = UILabel()
        label.text = "hello, world"
        label.sizeToFit()
        label.center = self.view.center
        view.addSubview(label)
    }
}

#実行結果
スクリーンショット

以下の警告が出ますが、気にしなくてイイみたいです。

ld: warning: relocatable dylibs (e.g. embedded frameworks) are only supported on iOS 8.0 and later (@rpath/libswift_stdlib_core.dylib)

cf. http://stackoverflow.com/questions/24622495/relocatable-dylibs-e-g-embedded-frameworks-are-only-supported-on-ios-8-0-and

以下を参考にしました。
http://www.atmarkit.co.jp/ait/articles/1211/07/news017.html
http://gupuru.hatenablog.jp/entry/2014/06/16/191358

6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?