67
CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally 1 Wednesday, February 10, 2010

CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

CS193P - Lecture 11iPhone Application Development

Text InputPresenting Content Modally

1Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
テキスト入力 ダイアログ的なコンテンツ表示
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 2: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Announcements• Paparazzi 3 assignment is due Wednesday 2/17• This Friday’s extra session will feature Evan Doll

2Wednesday, February 10, 2010

Page 3: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Today’s Topics• Threading Wrap-Up• iPhone Keyboards• Customizing Text Input• Presenting Content Modally

3Wednesday, February 10, 2010

xkozima
Typewritten Text
(これは省略)
xkozima
Typewritten Text
xkozima
Typewritten Text
キーボード
xkozima
Typewritten Text
テキスト入力のカスタマイズ
xkozima
Typewritten Text
ダイアログ的(一時的)な コンテンツ表示
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 4: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

NSOperation• Abstract superclass• Manages thread creation and lifecycle

• Encapsulate a unit of work in an object• Specify priorities and dependencies

5Wednesday, February 10, 2010

xkozima
Typewritten Text
(省略)
xkozima
Typewritten Text
Page 5: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Creating an NSOperation Subclass• Define a custom init method

• Override -main method to do work

- (id)initWithSomeObject:(id)someObject{

self = [super init];if (self) {

self.someObject = someObject;}return self;

}

- (void)main{

[someObject doLotsOfTimeConsumingWork];}

6Wednesday, February 10, 2010

xkozima
Typewritten Text
(省略)
Page 6: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

NSOperationQueue• Operations are typically scheduled by adding to a queue• Choose a maximum number of concurrent operations• Queue runs operations based on priority and dependencies

7Wednesday, February 10, 2010

xkozima
Typewritten Text
(省略)
Page 7: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Using an NSInvocationOperation• Concrete subclass of NSOperation• For lightweight tasks where creating a subclass is overkill

- (void)someAction:(id)sender{

NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(doWork:) object:someObject];

[queue addObject:operation];

[operation release];}

8Wednesday, February 10, 2010

xkozima
Typewritten Text
(省略)
Page 8: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

iPhone Keyboards

9Wednesday, February 10, 2010

xkozima
Typewritten Text
iPhone キーボード
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 9: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Virtual keyboard Appears when needed

10Wednesday, February 10, 2010

xkozima
Typewritten Text
仮想キーボード 必要に応じて現われる
xkozima
Typewritten Text
Page 10: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Virtual keyboard Appears when needed

11Wednesday, February 10, 2010

Page 11: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

12Wednesday, February 10, 2010

xkozima
Typewritten Text
Page 12: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Portrait and Landscape

13Wednesday, February 10, 2010

Page 13: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Simple selection modelText loupe/magnifier

14Wednesday, February 10, 2010

xkozima
Typewritten Text
シンプルな選択モデル テキスト用のルーペ/拡大鏡
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 14: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Many keyboard typesAdapted to task

15Wednesday, February 10, 2010

xkozima
Typewritten Text
たくさんのキーボードタイプ タスクに適応
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 15: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Many keyboard typesAdapted to task

16Wednesday, February 10, 2010

xkozima
Typewritten Text
URL 入力用
xkozima
Typewritten Text
Page 16: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Many keyboard typesAdapted to task

17Wednesday, February 10, 2010

xkozima
Typewritten Text
メアド入力用
xkozima
Typewritten Text
Page 17: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Many keyboard typesAdapted to task

18Wednesday, February 10, 2010

xkozima
Typewritten Text
電話番号入力用
xkozima
Typewritten Text
Page 18: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Many keyboard typesAdapted to task

19Wednesday, February 10, 2010

xkozima
Typewritten Text
パスワード入力用
xkozima
Typewritten Text
Page 19: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Many keyboard typesAdapted to task

20Wednesday, February 10, 2010

xkozima
Typewritten Text
パスコード(4桁数字)     入力用
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 20: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Single line editing

21Wednesday, February 10, 2010

xkozima
Typewritten Text
単一行での編集
xkozima
Typewritten Text
Page 21: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Multi-line editing

22Wednesday, February 10, 2010

xkozima
Typewritten Text
複数行にわたる編集
xkozima
Typewritten Text
xkozima
Typewritten Text
40カ国語の 入力辞書サポート
Page 22: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

40Languages

Full dictionary support

23Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
40カ国語について 入力辞書をサポート
xkozima
Typewritten Text
Page 23: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

English

24Wednesday, February 10, 2010

xkozima
Typewritten Text
英語
xkozima
Typewritten Text
Page 24: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

French

25Wednesday, February 10, 2010

xkozima
Typewritten Text
フランス語
xkozima
Typewritten Text
Page 25: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Russian

26Wednesday, February 10, 2010

xkozima
Typewritten Text
ロシア語
xkozima
Typewritten Text
Page 26: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Korean

27Wednesday, February 10, 2010

xkozima
Typewritten Text
韓国/朝鮮語
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 27: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Japanese Romaji

28Wednesday, February 10, 2010

xkozima
Typewritten Text
日本語(ローマ字入力)
xkozima
Typewritten Text
Page 28: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Japanese Kana

29Wednesday, February 10, 2010

xkozima
Typewritten Text
日本語(テンキー/カナ入力)
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 29: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Chinese Pinyin

30Wednesday, February 10, 2010

xkozima
Typewritten Text
中国語(拼音字母による入力)
xkozima
Typewritten Text
Page 30: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Chinese Handwriting

Simplified Traditional

31Wednesday, February 10, 2010

xkozima
Typewritten Text
中国語(手書き入力)   簡体字(电气)   繁体字(電氣)
Page 31: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Customizing Text Input

32Wednesday, February 10, 2010

xkozima
Typewritten Text
テキスト入力のカスタマイズ
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
  
Page 32: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Containers

33Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
UITextView - - - 複数行のテキスト UITextField - - - 単一行のテキスト
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 33: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Containers

DelegatesNotifications

Methods

34Wednesday, February 10, 2010

xkozima
Typewritten Text
UITextView - - - 複数行のテキスト UITextField - - - 単一行のテキスト
xkozima
Typewritten Text
コントローラと 情報をやりとりする 従来的な3つの方法
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 34: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Containers

Text Input Traits

35Wednesday, February 10, 2010

xkozima
Typewritten Text
テキスト入力特性
xkozima
Typewritten Text
UITextView - - - 複数行のテキスト UITextField - - - 単一行のテキスト
xkozima
Typewritten Text
Page 35: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Input Traits

ProtocolUITextFieldUITextView

36Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
テキスト入力特性 - - - - - - プロトコル
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 36: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Input Traits

Autocapitalization

Autocorrection

Keyboard Type

Keyboard Appearance

Return Key Type

Return Key Autoenabling

Secure Text Entry

37Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
テキスト入力特性
xkozima
Typewritten Text
大文字化
xkozima
Typewritten Text
xkozima
Typewritten Text
スペル訂正
xkozima
Typewritten Text
xkozima
Typewritten Text
型(タイプ)
xkozima
Typewritten Text
xkozima
Typewritten Text
外見
xkozima
Typewritten Text
リターンキー
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
何か入力されたらリターンキーを有効にする
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 37: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

URL KeyboardGo button

Text Input Traits

38Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
キーボードのタイプ
xkozima
Typewritten Text
xkozima
Typewritten Text
リターンキーのタイプ
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
テキスト入力特性
xkozima
Typewritten Text
Page 38: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Default KeyboardGoogle button

Text Input Traits

39Wednesday, February 10, 2010

xkozima
Typewritten Text
標準タイプ
xkozima
Typewritten Text
xkozima
Typewritten Text
ぐぐるボタン
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 39: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text ContainersText Input Traits

DelegatesNotifications

Methods

40Wednesday, February 10, 2010

Page 40: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Containers

41Wednesday, February 10, 2010

xkozima
Typewritten Text
UITextField UITextView など
xkozima
Typewritten Text
Page 41: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Design time

URL KeyboardGo button

UITextField

43Wednesday, February 10, 2010

xkozima
Typewritten Text
入力特性を デザイン
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 42: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Run time

URL KeyboardGo button

UITextField

44Wednesday, February 10, 2010

xkozima
Typewritten Text
実行時は…
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 43: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Become first responder

URL KeyboardGo button

UITextField

45Wednesday, February 10, 2010

xkozima
Typewritten Text
UITextFiled がユーザ応答の責任をもつ
xkozima
Typewritten Text
Page 44: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Keyboard

Become first responder

URL KeyboardGo button

UITextField

45Wednesday, February 10, 2010

xkozima
Typewritten Text
キーボードが現われる
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 45: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Keyboard

Become first responder

URL KeyboardGo button

UITextField

46Wednesday, February 10, 2010

Page 46: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Keyboard

Become first responder

URL KeyboardGo button

UITextField

46Wednesday, February 10, 2010

xkozima
Typewritten Text
キーボードに UITextField が接続される
xkozima
Typewritten Text
Page 47: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Keyboard

Keyboard adopts traits

URL KeyboardGo button

UITextFieldURL KeyboardGo button

47Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
キーボードが入力特性を受け取る
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 48: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Keyboard

Keyboard adopts traits

URL KeyboardGo button

UITextFieldURL KeyboardGo button

47Wednesday, February 10, 2010

xkozima
Typewritten Text
入力が終わったときキーボードを隠すには たとえば [textField resignFirstResponder];
Page 49: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Text Containers

UITextField

UITextView

Web Forms

48Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
ウェブページ上の 入力フォーム (HTML5 ならカスタム化可能)
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 50: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Demo:Text Input

49Wednesday, February 10, 2010

Page 51: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Presenting Content Modally

50Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
一時的に(ユーザからの何らかの操作を期待して) コンテンツを表示すること(いわゆるダイアログ)
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 52: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

• For adding or picking data

Presenting Content Modally

51Wednesday, February 10, 2010

Page 53: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

• For adding or picking data

Presenting Content Modally

51Wednesday, February 10, 2010

xkozima
Typewritten Text
ダイアログ的な コンテンツ表示
xkozima
Typewritten Text
データの追加あるいは選択
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Oval
xkozima
Line
xkozima
Typewritten Text
時刻設定ダイアログ
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Oval
xkozima
Line
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
メアド入力 ダイアログ
xkozima
Typewritten Text
xkozima
Line
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
連絡先選択 ダイアログ
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
入れ子になったダイアログ
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 54: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Presenting a View Controller// Recipe list view controller- (void)showAddRecipe {

RecipeAddViewController *viewController = ...;[self presentModalViewController:viewController animated:YES];

}

52Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Modal View Controller によるダイアログ表示
xkozima
Typewritten Text
Page 55: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a View Controller// Recipe list view controller- (void)didAddRecipe {

[self dismissModalViewControllerAnimated:YES];}

53Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
ダイアログを開放する(閉じる)には…
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 56: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a View Controller// Recipe list view controller- (void)didAddRecipe {

[self dismissModalViewControllerAnimated:YES];}

53Wednesday, February 10, 2010

xkozima
Typewritten Text
ダイアログを開放する(閉じる)には…
xkozima
Typewritten Text
Page 57: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Separate Navigation Stacks

54Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
 
xkozima
Oval
Page 58: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Separate Navigation Stacks

54Wednesday, February 10, 2010

xkozima
Typewritten Text
Chocolate Cake
xkozima
Typewritten Text
xkozima
Oval
xkozima
Typewritten Text
xkozima
Line
xkozima
Typewritten Text
ダイアログの スタックに チョコケーキの レシピ画面を 新規挿入 (この裏側に)
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 59: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Separate Navigation Stacks

54Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
写真を選択したあとは チョコケーキのレシピ に戻るようにできる
xkozima
Oval
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 60: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a Modal View Controller• Who should do it?• Best practice is for the same object to call present and dismiss

• Define delegate methods for the presented controller■ Tell the delegate when the presented controller is done■ The delegate makes the call to dismiss

55Wednesday, February 10, 2010

xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
ダイアログを閉じるには
xkozima
Typewritten Text
xkozima
Typewritten Text
表示したコントローラが閉じるのがよい
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 61: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a Modal View Controller• Who should do it?• Best practice is for the same object to call present and dismiss

• Define delegate methods for the presented controller■ Tell the delegate when the presented controller is done■ The delegate makes the call to dismiss

Parent Controller

55Wednesday, February 10, 2010

Page 62: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a Modal View Controller• Who should do it?• Best practice is for the same object to call present and dismiss

• Define delegate methods for the presented controller■ Tell the delegate when the presented controller is done■ The delegate makes the call to dismiss

Parent Controller

Child Controller

Present

55Wednesday, February 10, 2010

Page 63: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a Modal View Controller• Who should do it?• Best practice is for the same object to call present and dismiss

• Define delegate methods for the presented controller■ Tell the delegate when the presented controller is done■ The delegate makes the call to dismiss

Parent Controller

Child Controller

I’m done!

55Wednesday, February 10, 2010

xkozima
Line
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
xkozima
Typewritten Text
Page 64: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a Modal View Controller• Who should do it?• Best practice is for the same object to call present and dismiss

• Define delegate methods for the presented controller■ Tell the delegate when the presented controller is done■ The delegate makes the call to dismiss

Parent Controller

Child Controller

Dismiss

55Wednesday, February 10, 2010

Page 65: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Dismissing a Modal View Controller• Who should do it?• Best practice is for the same object to call present and dismiss

• Define delegate methods for the presented controller■ Tell the delegate when the presented controller is done■ The delegate makes the call to dismiss

Parent Controller

55Wednesday, February 10, 2010

Page 66: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Demo:Presenting Content Modally

56Wednesday, February 10, 2010

Page 67: CS193P - Lecture 11CS193P - Lecture 11 iPhone Application Development Text Input Presenting Content Modally Wednesday, February 10, 2010 1 テキスト入力\爰쀰ꐰꈰ 끶萰樰댰

Questions?

57Wednesday, February 10, 2010

xkozima
Typewritten Text