MASExampleViewController.m
779 Bytes
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
//
// MASExampleOneViewController.m
// Masonry
//
// Created by Jonas Budelmann on 20/07/13.
// Copyright (c) 2013 cloudling. All rights reserved.
//
#import "MASExampleViewController.h"
#import "MASExampleBasicView.h"
@interface MASExampleViewController ()
@property (nonatomic, strong) Class viewClass;
@end
@implementation MASExampleViewController
- (id)initWithTitle:(NSString *)title viewClass:(Class)viewClass {
self = [super init];
if (!self) return nil;
self.title = title;
self.viewClass = viewClass;
return self;
}
- (void)loadView {
self.view = self.viewClass.new;
self.view.backgroundColor = [UIColor whiteColor];
}
#ifdef __IPHONE_7_0
- (UIRectEdge)edgesForExtendedLayout {
return UIRectEdgeNone;
}
#endif
@end