转载地址:http://www.xuanyusong.com/archives/1514
系统自带的NavigationBar局限性比较大,往往开发中我们需要制作比较精美的导航栏。常见的导航栏都是由三部分组成的。 如下图所示, 左边的按钮视图, 中间的视图,右侧的按钮视图。本篇文章我们就来模拟Path这个软件的NavigationBar。
AppDelegate.h
1 |
#import
<UIKit/UIKit.h> |
2 |
#import
"MyViewController.h" |
3 |
@interface
AppDelegate : UIResponder <UIApplicationDelegate> |
5 |
@property
(strong, nonatomic) UIWindow *window; |
6 |
@property
(strong, nonatomic) UINavigationController *navController; |
7 |
@property
(strong, nonatomic) UIViewController *viewController; |
AppDelegate.m
01 |
#import
"AppDelegate.h" |
03 |
@implementation
AppDelegate |
05 |
@synthesize
window = _window; |
06 |
@synthesize
navController; |
07 |
@synthesize
viewController; |