Soumettre la recherche
Mettre en ligne
第三回 iOSアプリ勉強会
•
Télécharger en tant que PPTX, PDF
•
0 j'aime
•
581 vues
D
Daisuke Tsukagoshi
Suivre
第三回 iOSアプリ勉強会の内容
Lire moins
Lire la suite
Ingénierie
Signaler
Partager
Signaler
Partager
1 sur 19
Télécharger maintenant
Recommandé
クラスのインスタンス変数について
クラスのインスタンス変数について
Tomoya Kawanishi
150421 es6とかな話
150421 es6とかな話
kotaro_hirayama
Google I/O 2012 and Android 4.1
Google I/O 2012 and Android 4.1
Katsumi Onishi
DevFest Japan 2014 Spring
DevFest Japan 2014 Spring
Takashi EGAWA
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Takashi EGAWA
HTML5 VIDEO on Chromecast
HTML5 VIDEO on Chromecast
Katsumi Onishi
Google cast開発入門
Google cast開発入門
しくみ製作所
アプリ内課金が小規模開発者にもたらす可能性 〜「中年騎士ヤスヒロ」の事例〜 @tatsuosakamoto
アプリ内課金が小規模開発者にもたらす可能性 〜「中年騎士ヤスヒロ」の事例〜 @tatsuosakamoto
Tatsuo Sakamoto
Recommandé
クラスのインスタンス変数について
クラスのインスタンス変数について
Tomoya Kawanishi
150421 es6とかな話
150421 es6とかな話
kotaro_hirayama
Google I/O 2012 and Android 4.1
Google I/O 2012 and Android 4.1
Katsumi Onishi
DevFest Japan 2014 Spring
DevFest Japan 2014 Spring
Takashi EGAWA
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Takashi EGAWA
HTML5 VIDEO on Chromecast
HTML5 VIDEO on Chromecast
Katsumi Onishi
Google cast開発入門
Google cast開発入門
しくみ製作所
アプリ内課金が小規模開発者にもたらす可能性 〜「中年騎士ヤスヒロ」の事例〜 @tatsuosakamoto
アプリ内課金が小規模開発者にもたらす可能性 〜「中年騎士ヤスヒロ」の事例〜 @tatsuosakamoto
Tatsuo Sakamoto
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Contenu connexe
En vedette
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
En vedette
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
第三回 iOSアプリ勉強会
1.
第三回iOSアプリ勉強会
2.
今日の内容 ・前回の復習 ・Classについて
・Storyboardの簡単な使い方 ・簡単なアプリを実装しよう!!
3.
前回の復習 XcodeのPlaygroundを開いてください
4.
前回の復習 ・Optional型について 何も無いことを表すnilを扱うためにはOptional型でwrapする
その変数(定数)を使用する際は!でunwrapする必要がある。
5.
前回の復習 ・型の変換(CAST)について 「as?」でCASTをするができない場合もある。
「as?」で変換したらOptional型になる。変換できない場合はnilとなる。
6.
前回の復習 ・制御構文
7.
Classについて 1. Classの宣言
もっとも小さいクラスの宣言 宣言と実装のように記述を二つ書く必要はなく、ただ単にクラスキーワード、クラス名、中 括弧で終わり プロパティや関数を宣言するには、中括弧{}の中にかく
8.
Classについて このPlayerクラスは、positionという名前の座標情報を保持するプロパティを持っていて、 デフォルトでは(0,
0) moveToという関数はプレイヤーを任意の位置に移動させる関数です ここではpositionに初期値を設定してありますが、設定しないとコンパイルエラーになります その理由は、現状Playerクラスはイニシャライザ(コンストラクタに相当)を持っていないため
9.
Classについて 2. インスタンスの生成
先ほど作ったクラスのインスタンスは以下のようにして生成する クラスのインスタンスを生成するには、ただ単にクラス名の後に「()」をつけるだけ プロパティやメソッドへのアクセスは「.」をつけて行う イニシャライザが指定されている場合引数を記述する。 それぞれの引数には変数名をつける必要がある。
10.
Classについて イニシャライザinit() ここの変数名(position)は、外部
変数名と呼ばれ、通常イニシャ ライザの内部処理を記述すると きにそのまま内部変数名として 使われますが、左のように書く ことで、外部変数名と内部変数 名を別の文字列にすることが可 能
11.
Classについて 3. メソッド
クラスのインスタンスの持つ関数を呼び出すには、「.」のあとに関数名を書く。 player.moveTo(Point(x:100, y:-100)) 引数の外部変数名は、関数側で明示的に書かない限り、呼び出し時には指定せず、内部変数名を外 部変数名として指定した場合には、コンパイルエラーになる ⇩先ほどのPlayerクラスのmoveTo()メソッドをちょっと修正
12.
Classについて 4. クラスの継承
クラスを継承して新たなクラスを作成するには、以下のようにクラス名の後に「:」を書き、その後 に親クラスの名前を書く 子クラスは、自動的に親クラスの持つイニシャライザを継承 子クラスのイニシャライザでは、親クラスのイニシャライザを呼び出す必要がある
13.
演習問題 BMIを計算し、判定するclassをつくりたい BMIの計算に必要な要素は身長(m)と体重(kg)
計算式は BMI=体重÷(身長×身長) (標準体重=(身長×身長)×22) 判定は BMIが18.5未満=>「痩せ」 BMIが18.5~25未満=>「標準」 BMIが25〜30 => 「肥満」 BMIが30以上=> 「高度肥満」
14.
Storyboardの使い方(ざっくり) ざっくりとStoryboardの使い方を解説します 機能がありすぎて僕自身まだまだ使いこなせていませんし、ググったらより詳しい解説がすでにた
くさんあります。 今回は先ほど実装したBMI計算クラスを使って入力=> 計算=> 結果表示をさせるアプリを作るため の簡単な使い方を解説します。 まずは Xcode のmenuからFile > New > Project で新しいプロジェクトを作成してください
15.
Drag & Drop
今回使うのは Label Button Text Field の3つです
16.
こんな感じで作りましょう! 配置はてきとーで構わないです 各部品は右メニューの値をいじることで設定で
きます BackgroundやButtonを画像するだけでも アプリっぽさを演出できます これだけではパーツを配置しただけなので プログラムに紐付け処理とパーツを関連させる 必要があります Button Label Text Field
17.
右上のの真ん中のボタンをClick! 画面を分割しViewControllerを表示 右クリック??したままDrag
& Drop もしくは controlキーを押しながらDrag & Drop
18.
Outlet は部品の配置。nameはプログラムで扱う変数になります Action
は部品になにかしらのactionを起こした時の処理。nameはプログラムで扱うメソッド名 今回はButtonを押した時にText Fieldに入力された「身長」「体重」を元に計算を行い、結果を返す 処理を実装します。(計算は先ほど作ったクラスを使いましょう) 結果はラベルにテキストとして出力させます。 とりあえず実践してみましょう!!!! 細かい箇所は口頭で説明します
19.
各個人ですすめる課題として考える簡単なアプリ例仕様 ①地図アプリ(MapKit.frameworkを使用) 地図表示させる
現在地を表示 更新ボタンで現在地を更新 地図上にピンを立て情報を表示 (経路検索) ②APIで外部からデータを取得し、アプリ内で表示(サーバ側のプログラムが必要) DBは使っても使わなくてもどっちでもOK サーバ側(PHPかな?)にAPIの機能を実装 NSURLConnectでアクセスしデータを取得 TableViewControllerに一覧をlistで表示(出力形式はなんでもいいです。扱うデータによります。) (listを押したら画面遷移し詳細なデータを表示) ニュースアプリ的なものをイメージ
Télécharger maintenant