Skip to content

HomeWork 2.2 NavigationController

ginrou edited this page Apr 17, 2013 · 2 revisions

UINavigationControllerとボタンのカスタマイズと、popToRootViewControllerについて

概要

  • UINavigationControllerを無限にpushできるようにする(講義中と同じ)
  • navigationbarのボタンについては
    • 右上はpushというタイトルのボタンで、タップすると同じview controllerがpushされる
    • 左上には、第一階層の時はpopボタンを、第二階層以降では戻るとpopボタンを配置する
      • 戻るボタンをタップすると、一つ前の階層に戻り
      • popボタンをタップすると、第一階層に戻る

イメージ

画像

ヒント、注意点など

  • 右上のボタンはself.navigationItem setRightBarButtonItem:でセットできます。渡す引数はUIBarButtonItem型です
  • 左上のボタンをセットすると戻るボタンが消えてしまいます。その時はself.navigationItem.leftItemsSupplementBackButton = YESとしてください。
  • 第一階層に戻るにはUINavigationControllerのpopToRootViewControllerAnimated:を呼べば戻れます
  1. 導入
  2. Objective C の基礎
  3. メモリ管理
  4. UIViewController1 - UIViewController のカスタマイズ
  5. UIViewController2 - ModalViewController
  6. UIViewController3 - ライフサイクル
  7. UIKit 1 - container, rotate-
  8. UINavigationController
  9. UITabController
  10. Custom Container View Controller
  11. Supporting Multiple Interface Orientations
  12. UIKit 2- UIView -
  13. UIView
  14. UIView のカスタマイズ
  15. UIView Animation
  16. UIKit 3 - table view -
  17. UITableView について
  18. UITableViewとNavigationController
  19. custom UITableViewCell の作成
  20. 4.4 UITableViewのその他のオプション、カスタマイズ
  21. UIKit 4 - images -
  22. UIImage (CoreGraphics)
  23. UIImageView
  24. Accets Library
  25. CoreImage
  26. UIKit 4 - text -
  27. UILabel
  28. UITextView
  29. KeybordNotification
  30. 非同期処理系
  31. NSURLConnection (json シリアライザ)
  32. Blocks
  33. GCD
  34. ローカルキャッシュ
  35. UserDefaults
  36. FileManager
  37. CoreData
  38. SQLite
  39. Instruments
  40. leak
  41. time profiler
  42. その他
  43. 単体テスト (GHUnit)
  44. 結合テスト (KIF)
  45. cocoaPods でライブラリ管理

edit sidebar

Clone this wiki locally