File tree Expand file tree Collapse file tree 5 files changed +17
-1
lines changed
NewsReader.xcodeproj/project.xcworkspace/xcuserdata/tangyouhuan.xcuserdatad Expand file tree Collapse file tree 5 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ + (NSArray *)pageControllers
55
55
nav = [[UINavigationController alloc ]initWithRootViewController:pageController];
56
56
pageController.title = pageInfo.name ;
57
57
pageController.tabBarItem .image = [UIImage imageNamed: pageInfo.image];
58
- [controllers addObject: pageController ];
58
+ [controllers addObject: nav ];
59
59
}
60
60
return controllers;
61
61
}
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ @implementation BaseController
14
14
-(void )viewDidLoad
15
15
{
16
16
[super viewDidLoad ];
17
+ [self setNavigationLeft: @" NavigationBell.png" sel: nil ];
18
+ [self setNavigationRight: @" NavigationSquare.png" ];
19
+ // [self setNavigationTitleImage:@"NavBarIcon.png"];
17
20
}
18
21
19
22
-(void )viewWillAppear : (BOOL )animated
@@ -89,6 +92,14 @@ - (UIButton *)customButton:(NSString *)imageName
89
92
return btn;
90
93
}
91
94
95
+ - (void )setNavigationTitleImage : (NSString *)imageName
96
+ {
97
+ UIImage *image = [UIImage imageNamed: imageName];
98
+ UIImageView *imageView = [[UIImageView alloc ] initWithImage: image];
99
+
100
+ self.navigationItem .titleView = imageView;
101
+ }
102
+
92
103
- (void )setNavigationLeft : (NSString *)imageName sel : (SEL )sel
93
104
{
94
105
UIBarButtonItem *item = [[UIBarButtonItem alloc ] initWithCustomView: [self customButton: imageName selector: sel]];
Original file line number Diff line number Diff line change 10
10
11
11
@implementation NewsPage
12
12
13
+ -(void )viewDidLoad
14
+ {
15
+ [super viewDidLoad ];
16
+ }
13
17
@end
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ NewsReader -- 新闻App
13
13
> * 登录功能实现
14
14
> * 显示广告
15
15
> * 设置状态栏
16
+ > * 设置底部导航栏
16
17
17
18
###MVVM架构
18
19
Model: DTO (数据传输对象)<br />
You can’t perform that action at this time.
0 commit comments