Skip to content

HomeWork 2 UIViewControllerとModalViewController

ginrou edited this page Apr 15, 2013 · 3 revisions

UIViewControllerとUIModalViewControllerを使った課題です。 途中までは講義中のものと同じです

課題

概要

  • UIViewControllerのView上にボタンを設置し、そのボタンを押すとモーダルが立ち上がる
    • 立ち上げるモーダルは新しいViewControllerクラスを作ってください
  • 立ち上がるモーダルにはボタンが一つついており、そのボタンをタップするとモーダルが閉じる
  • モーダルを殺す処理はモーダル自身がするのではなく、delegateを用いてモーダルを表示させた親が殺すようにする
  • ---------ここまでは講義中のものと同じ------------
  • modalが閉じた瞬間に新しいmodalを表示するようにしてください

イメージ

遷移イメージ

少しだけ解説

dismissViewControllerにはcompletitionBlockという引数があります。 この引数には、モーダルが閉じきった時に実行するクロージャ(Blocks)を渡します。Blocksについては、また後日解説がありますが、 「完了時に実行したい処理」を書けば問題ありません。

目的

  • UIViewControllerを作れるようになる
  • ModalViewを表示させることができるようになる
  • delegateパターンを実装できるようになる
  • completitionBlockが使えるようになる
  1. 導入
  2. Objective C の基礎
  3. メモリ管理
  4. UIViewController1 - UIViewController のカスタマイズ
  5. UIViewController2 - ModalViewController
  6. UIViewController3 - ライフサイクル
  7. UIKit 1 - container -
  8. UINavigationController
  9. UITabController
  10. Custom Container View Controller
  11. UIKit 2 - table view -
  12. UITableView について
  13. UITableViewDelegate, UITableViewDatasource について
  14. custom UITableViewCell の作成
  15. (iOS6) UIRefreshControl について
  16. UIKit 3 - images -
  17. UIImage (CoreGraphics)
  18. UIImageView
  19. Accets Library
  20. CoreImage
  21. UIKit 4 - text -
  22. UILabel
  23. UITextView
  24. KeybordNotification
  25. 非同期処理系
  26. NSURLConnection (json シリアライザ)
  27. Blocks
  28. GCD
  29. View アニメーション、回転対応
  30. View animation
  31. Core animation
  32. lotate
  33. ローカルキャッシュ
  34. UserDefaults
  35. FileManager
  36. CoreData
  37. SQLite
  38. Instruments
  39. leak
  40. time profiler
  41. その他
  42. 単体テスト (GHUnit)
  43. 結合テスト (KIF)
  44. cocoaPods でライブラリ管理

edit sidebar

Clone this wiki locally