-
Notifications
You must be signed in to change notification settings - Fork 0
/
PersonLandingPage.m
52 lines (43 loc) · 1.52 KB
/
PersonLandingPage.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// PersonLandingPage.m
// ALPHACamp
//
// Created by CoSNaYe on 4/3/15.
// Copyright (c) 2015 ALPHACamp. All rights reserved.
//
#import "PersonLandingPage.h"
#import "PersonalInfoVC.h"
#import <AFNetworking/AFNetworking.h>
@interface PersonLandingPage()
@property (weak, nonatomic) IBOutlet UIButton *toPersonDetailButton;
@property (strong, nonatomic) UIImageView *navigationTitleImageView;
@end
@implementation PersonLandingPage
- (void)viewDidLoad
{
[self setupUI];
}
- (void)setupUI
{
//set the push button
self.toPersonDetailButton.layer.masksToBounds = YES;
self.toPersonDetailButton.layer.cornerRadius = 3.0;
//set the navigation header image
self.navigationItem.titleView = self.navigationTitleImageView;
self.navigationController.navigationBar.backgroundColor = [UIColor grayColor];
}
- (UIImageView *)navigationTitleImageView
{
if (!_navigationTitleImageView) {
UIImage *myImage = [UIImage imageNamed:@"navigationImage"];
UIImageView *titleImage = [[UIImageView alloc]
initWithFrame:CGRectMake(self.view.frame.size.width/3, 50, self.view.frame.size.width/3, 20)];
titleImage.image = myImage;
titleImage.contentMode = UIViewContentModeScaleAspectFit;
_navigationTitleImageView = titleImage;
}
return _navigationTitleImageView;
//another way to set navigation bar image
//self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"navigationImage"]];
}
@end