Lecture 10

Lecture 10 - Stanford CS193p Fall 2011 Developing...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Stanford CS193p Fall 2011 Developing Applications for iOS Fall 2011 Stanford CS193p Stanford CS193p Fall 2011 Today UITabBarController Another “controller of controllers” Mostly set up with ctrl-drag just like split view or navigation controller UINavigationItem Controlling what’s at top when a UIViewController gets pushed onto a UINavigationController Blocks Objective-C language feature for in-lining blocks of code Foundation of multi-threaded support (GCD) Stanford CS193p Fall 2011 UITabBarController Stanford CS193p Fall 2011 UITabBarController View Controller View Controller View Controller Tab Bar Controller You control drag to create these connections in Xcode. Doing so is setting @property (nonatomic, strong) NSArray *viewControllers; inside your UITabBarController. Stanford CS193p Fall 2011 UITabBarController View Controller View Controller View Controller Tab Bar Controller By default this is the UIViewController ’s title property (and no image) But usually you set both of these in your storyboard in Xcode. Stanford CS193p Fall 2011 UITabBarController View Controller View Controller View Controller Tab Bar Controller UIViewController ’s tabBarItem property (not a UITabBarController property) can be used to set attributes for that VC’s tab.- (void)somethingHappenedToCauseUsToNeedToShowABadgeValue { self.tabBarItem.badgeValue = @“R”; } R Stanford CS193p Fall 2011 UITabBarController View Controller View Controller View Controller Tab Bar Controller View Controller View Controller View Controller View Controller What if there are more than 4 View Controllers? Stanford CS193p Fall 2011 UITabBarController View Controller View Controller View Controller Tab Bar Controller View Controller View Controller View Controller View Controller A More button appears. More button brings up a UI to let the user edit which buttons appear on bottom row Stanford CS193p Fall 2011 UITabBarController View Controller View Controller View Controller Tab Bar Controller View Controller View Controller View Controller View Controller A l l H a p p e n s A u t o m a t i c a l l y Stanford CS193p Fall 2011 Combine? Can you combine UINavigationController & UITabBarController? Certainly. Quite common. UINavigationController goes “inside” the UITabBarController . Never the other way around. Can you combine UITabBarController and UISplitViewController? Less common. The UITabBarController goes inside the UISplitViewController (Master or Detail). Stanford CS193p Fall 2011 Combine Stanford CS193p Fall 2011 UINavigationController Modifying buttons and toolbar items in a navigation controller You can set most of this up in Xcode by dragging items into your scene. But you may want to add buttons or change buttons at run time too ......
View Full Document

This note was uploaded on 01/25/2012 for the course CS 193P taught by Professor Evandoll during the Fall '09 term at Stanford.

Page1 / 38

Lecture 10 - Stanford CS193p Fall 2011 Developing...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online