-
Notifications
You must be signed in to change notification settings - Fork 0
/
ViewContentsTip.m
executable file
·57 lines (44 loc) · 1.47 KB
/
ViewContentsTip.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
53
54
55
56
57
//
// ViewContentsTip.m
// DisasterHelper
//
// Created by ENCLAVEIT on 2/17/14.
// Copyright (c) 2014 Tan (Tharin) T.NGUYEN. All rights reserved.
//
#import "ViewContentsTip.h"
@interface ViewContentsTip ()
@end
@implementation ViewContentsTip
@synthesize currentTip;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
-(void)back {
[self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidLoad
{
//Custom navigator back button
UIImage *buttonImage = [UIImage imageNamed:@"back111.png"];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:buttonImage forState:UIControlStateNormal];
button.frame = CGRectMake(0, 0, buttonImage.size.width, buttonImage.size.height);
[button addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *customBarItem = [[UIBarButtonItem alloc] initWithCustomView:button];
self.navigationItem.leftBarButtonItem = customBarItem;
[super viewDidLoad];
// Do any additional setup after loading the view.
// show contents of tip.
[web loadHTMLString:[currentTip contentsTip] baseURL:NULL];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end