1
- //
2
- // CLTableWithFooterViewController.m
3
- //
4
- // Copyright (c) 2013 Chris Ledet
5
- //
1
+ /*
2
+ CLTableWithFooterViewController.m
3
+
4
+ Copyright (c) 2013 Chris Ledet
5
+ Licensed under the MIT license <http://opensource.org/licenses/MIT>
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
8
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation
9
+ the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
10
+ to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions
13
+ of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
16
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
18
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ IN THE SOFTWARE.
20
+ */
6
21
7
22
#import " CLTableWithFooterViewController.h"
8
23
@@ -14,15 +29,29 @@ @interface CLTableWithFooterViewController()
14
29
15
30
@implementation CLTableWithFooterViewController
16
31
32
+ #pragma mark Layout
33
+
17
34
- (void )viewDidLoad
18
35
{
19
36
[super viewDidLoad ];
20
37
38
+ if (!self.tableView ) {
39
+ [self setUpTableView ];
40
+ }
41
+
21
42
self.footerImageView = [[UIImageView alloc ] initWithFrame: CGRectZero];
22
43
[self .view addSubview: self .footerImageView];
23
44
}
24
45
25
- #pragma mark - Properties
46
+ - (void )setUpTableView
47
+ {
48
+ self.tableView = [[UITableView alloc ] initWithFrame: CGRectMake (0 , 0 , self .view.frame.size.width, self .view.frame.size.height)];
49
+ self.tableView .delegate = self;
50
+ self.tableView .dataSource = self;
51
+ [self .view addSubview: self .tableView];
52
+ }
53
+
54
+ #pragma mark Properties
26
55
27
56
- (void )setFooterImage : (UIImage *)footerImage
28
57
{
@@ -34,7 +63,7 @@ - (void)setFooterImage:(UIImage *)footerImage
34
63
}
35
64
}
36
65
37
- #pragma mark - UIScrollViewDelegate Methods
66
+ #pragma mark UIScrollView Delegate
38
67
39
68
- (void )scrollViewDidScroll : (UIScrollView *)scrollView
40
69
{
0 commit comments