📄 readme.txt
字号:
NavBarDemonstrates how to use UINavigationController and UIViewController classes together as building blocks to your application's user interface. Use it as a launching pad in starting the development of you new application. The various pages in this sample exhibit different ways in how to modify the navigation bar by modifying the navigation controller's UINavigationItem. This class represents the navigation bar at the top of the screen. Among the levels of customization are varying appearance styles known as UIBarStyle, and applying custom left and right buttons known as UIBarButtonItems.In addition, this sample shows a technique in how to manage multiple nib files on one application. Each page or UIViewController contains its own nib and is loaded using: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;Build RequirementsMac OS X 10.5.3, Xcode 3.1, iPhone OS 2.0.Runtime RequirementsMac OS X 10.5.3, iPhone OS 2.0.Using the SampleBuild and run the sample using Xcode 3.1. To run in the simulator, set the Active SDK to Simulator. To run on a device, set the Active SDK to the appropriate Device setting.Bar StyleClick the "Style" button to the left of the main page to change the navigation bar's style or UIBarStyle. This will take you to an action sheet where you can change the background's appearance (default, black-opaque, or black-translucent).View OneThis page adds a titled UIButton of type UIButtonTypeNavigation to the right button view of the navigation bar.View TwoThis page adds a UIButton of type UIButtonTypeNavigation to the right button view of the navigation bar, but with a UIImage instead of text.View ThreeThis page adds a UISegmentedControl to the right button view of the navigation bar.View FourThis page adds a UISegmentedControl as the custom title view (center) of the navigation bar.View FiveThis page adds a UISegmentedControl as the custom title view (center) of the navigation bar plus a prompt string.Info ButtonPresents a UIViewController as a modal type-view covering the entire screen.Delegate MethodsAll pages implement the UIViewController's viewDidAppear delegate method to demonstrate one of the many useful delegate methods to alter or customize the behavior of your user interface.Packaging Listmain.m - Main source file for this sample.AppDelegate.h/.m - The application's delegate to setup its window and content.MainViewController.h/.m - The front UIViewController containing a table to navigate to all its views.PageOneViewController.h/.m - Page one of customizing the navigation bar's right button view.PageTwoViewController.h/.m - Page two of customizing the navigation bar's right button view with an image.PageThreeViewController.h/.m - Page three of customizing the navigation bar's left and right views.PageFourViewController.h/.m - Page four of customizing the navigation bar's title view.PageFiveViewController.h/.m - Page five of customizing the navigation bar's title view and prompt.PageSixViewController.h/.m - Page six presented as a modal view controller.MyCustomCell.h/.m - A custom "UITableViewCell" used for drawing the cell with with extra title information.Changes from Previous Versions1.0 - First release1.1 - Minor update to the latest SDK API changes.1.2 - Updated for Beta 3: reusable UITableView cells, added new use of UIViewController "presentModalViewController".1.3 - Updated for Beta 4, changed to use Interface Builder xib file.1.4 - Updated for Beta 5: changes to UITableViewDelegate, upgraded to use xib files for each UIViewController.1.5 - Beta 6 Release, minor UI improvements.1.6 - Changed bundle identifier.1.7 - Updated for and tested with iPhone OS 2.0. First public release.Copyright (C) 2008 Apple Inc. All rights reserved.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -