環境
- Xcodeを起動して[Create a new project]を選択して下さい。
- 今回は[Single View Application]を選択します。
- Nextを押して下さい。
- Product Name、Organization Name、Organization Identiferを設定して下さい。
- 今回、LanguageはObjective-Cを選択します。
- Nextを押して下さい
- 保存先を指定して、Createを押して下さい。
- プロジェクトが作成されます。
- ViewController.mを開いてviewDidLoadメソッドに下記のサンプルコードを追加
- command + Rでアプリを実行する。


[サンプルコード]
UILabel *lavel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];lavel.text = @"Hello Objective-C";[self.view addSubview:lavel];
UILabel *lavel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];lavel.text = @"Hello Objective-C";[self.view addSubview:lavel];
0 件のコメント:
コメントを投稿