Return to Video

TabViewControllers Bond Villains in Tabs - UIKit Fundamentals

  • 0:00 - 0:03
    We want the user to be able to
    toggle between viewing set memes
  • 0:03 - 0:06
    as a collection and
    viewing them as a table.
  • 0:06 - 0:09
    We'll do this using
    a tab bar controller.
  • 0:09 - 0:11
    Tab bar controllers
    are fairly straight forward,
  • 0:11 - 0:15
    lets practice by setting up
    the Bond Villian's app using tabs.
  • 0:15 - 0:18
    Here I've got the Bond Villian's app
    with the master detail structure and
  • 0:18 - 0:20
    I'm going to drag in
    a tab bar controller.
  • 0:22 - 0:26
    The tab bar controller comes
    automatically connected to two items.
  • 0:26 - 0:29
    I don't need those though, so
    I'm going to go ahead and delete them.
  • 0:31 - 0:34
    I'll connect the tab bar
    controllers first tab by dragging
  • 0:34 - 0:36
    from the connections menu.
  • 0:36 - 0:41
    Here under triggered segues to the
    navigation controller for my table view.
  • 0:41 - 0:43
    Next up, we'll connect
    the collection view controller.
  • 0:43 - 0:46
    Here you can see I've added the
    Villain Collection View Controller for
  • 0:46 - 0:48
    showing bond villains in a grid.
  • 0:48 - 0:51
    And I've assigned it as the root
    ViewController to this second navigation
  • 0:51 - 0:53
    controller.
  • 0:53 - 0:55
    I'll connect the second tab to
    the navigation controller for
  • 0:55 - 0:59
    the collection view, again, by dragging
    from the ViewController segues
  • 0:59 - 1:01
    in the tab bar controllers
    connections menu.
  • 1:02 - 1:05
    And then once I've got the tab
    bar controller all connected up,
  • 1:05 - 1:09
    I want to make sure that it's set
    up as the initial ViewController.
  • 1:09 - 1:13
    Which I can do here in
    the attributes inspector.
  • 1:13 - 1:14
    And then we'll run it.
  • 1:15 - 1:19
    Okay, there's our table, and
    we can toggle to a collection and
  • 1:19 - 1:20
    back to a table.
  • 1:21 - 1:22
    Alright.
  • 1:22 - 1:26
    And if you want to change the appearance
    of the bar items, you just go back into
  • 1:26 - 1:31
    Storyboard, click on the bar item in its
    respective navigation controller, and
  • 1:31 - 1:33
    then in the attributes inspector,
  • 1:33 - 1:38
    you can change the title [SOUND]
    or you can add an image.
Tytuł:
TabViewControllers Bond Villains in Tabs - UIKit Fundamentals
Opis:

more » « less
Video Language:
English
Team:
Udacity
Projekt:
UD788 - UIKit Fundamentals
Duration:
01:40

English subtitles

Revisions Compare revisions