「Ios/swift」の版間の差分

提供: 初心者エンジニアの簡易メモ
ナビゲーションに移動 検索に移動
編集の要約なし
20行目: 20行目:
#LabelにHelloworldを記載し
#LabelにHelloworldを記載し
#▶︎を押して再生
#▶︎を押して再生
参照:http://vdeep.net/start-ios-swift

2016年6月17日 (金) 12:40時点における版

swift準備

  1. macのapp_storeでxcodeをインストール
  2. create new projectを選択
  3. Single View Applicationを選択
  4. ProductNameをHelloworld、OriginalIdをcom.example、LanguageをSwift、DevicesをiPhoneで作成

コンソールにHelloworld

  1. ViewController.swiftの以下の場所にprintを追加
   override func viewDidLoad() {
       super.viewDidLoad()
       print("Helloworld");
   }
  1. ▶︎を押して再生すると右下のコンソール欄にHelloworldと表示される

参照:http://qiita.com/maximum80/items/4116985b7276fdb45576

画面上にHelloworldのラベルを表示

  1. Main.storyboradを選択し、右下の◎を選択してオブジェクト一覧を選択
  2. Labelを中央にドラッグしてくる。
  3. LabelにHelloworldを記載し
  4. ▶︎を押して再生

参照:http://vdeep.net/start-ios-swift