-
Notifications
You must be signed in to change notification settings - Fork 2
/
AboutViewController.m
executable file
·61 lines (48 loc) · 1.51 KB
/
AboutViewController.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
58
59
60
61
//
// AboutViewController.m
// searchbar
//
// Created by pclemins on 08/18/14.
// Copyright (c) 2014 pclemins. All rights reserved.
//
#import "AboutViewController.h"
@interface AboutViewController ()
@end
@implementation AboutViewController
@synthesize scrollView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
-(void)viewDidLoad {
[super viewDidLoad];
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { // if iOS 7
self.edgesForExtendedLayout = UIRectEdgeNone; //layout adjustements
}
// Tags are integers? Really?
UITextView *label = [self.view viewWithTag:1];
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSString *aboutContent = [userDefaults stringForKey:@"about"];
// Protect against the content not being set
if([aboutContent length] > 0) {
label.text = aboutContent;
}
}
- (void)viewWillAppear:(BOOL)animated {
//[self.navigationController setNavigationBarHidden:YES animated:animated];
[super viewWillAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated {
//[self.navigationController setNavigationBarHidden:NO animated:animated];
[super viewWillDisappear:animated];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end