-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHowToController.m
53 lines (43 loc) · 1.3 KB
/
HowToController.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
//
// HowToController.m
//
// Created by Simon Wigzell on 2014-03-10.
//
//
#import "HowToController.h"
@interface HowToController ()
@end
@implementation HowToController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.imageView.image = [self.delegate imageForController:self];
self.howToText.backgroundColor = [UIColor clearColor];
self.howToText.attributedText = [self.delegate stringForController:self];
self.imageView.image = [self.delegate imageForController:self];
CGFloat fixedWidth = self.howToText.frame.size.width;
CGSize newSize = [self.howToText sizeThatFits:CGSizeMake(fixedWidth, MAXFLOAT)];
CGRect newFrame = self.howToText.frame;
newFrame.size = CGSizeMake(fmaxf(newSize.width, fixedWidth), newSize.height);
self.howToText.frame = newFrame;
// self.howToText.dataDetectorTypes = UIDataDetectorTypeNone;
NSLog(@"");
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)dismissHowToView
{
[self.delegate dismissHowToController];
}
@end