-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
daiming
committed
Nov 26, 2015
1 parent
d429661
commit 255f660
Showing
13 changed files
with
1,154 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// SMListView.h | ||
// | ||
// Created by DaiMing on 15/11/25. | ||
// Copyright © 2015年 starming. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import "SMTableView.h" | ||
|
||
@interface SMListViewController : UIViewController | ||
|
||
@property (nonatomic, strong) UIView *listView; | ||
@property (nonatomic, strong) SMTableView *tableView; | ||
|
||
//初始化 | ||
- (instancetype)initWithTableView; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// | ||
// SMListView.m | ||
// RSSRead | ||
// | ||
// Created by DaiMing on 15/11/25. | ||
// Copyright © 2015年 starming. All rights reserved. | ||
// | ||
|
||
#import "SMListViewController.h" | ||
|
||
#import "Masonry.h" | ||
|
||
typedef NS_ENUM(NSInteger, SMListViewType) { | ||
SMListViewTypeTableView, | ||
}; | ||
|
||
@interface SMListViewController() | ||
|
||
|
||
@property (nonatomic) SMListViewType listType; | ||
|
||
|
||
@end | ||
|
||
@implementation SMListViewController | ||
#pragma mark - init | ||
- (instancetype)initWithTableView { | ||
self = [super init]; | ||
if (self) { | ||
[self setupTableView]; | ||
self.listType = SMListViewTypeTableView; | ||
} | ||
return self; | ||
} | ||
|
||
#pragma mark - Private | ||
|
||
#pragma mark - Tableview | ||
- (void)setupTableView { | ||
[self.listView addSubview:self.tableView]; | ||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.height.equalTo(self.listView); | ||
make.width.equalTo(self.listView); | ||
make.center.equalTo(self.listView); | ||
}]; | ||
} | ||
|
||
#pragma mark - getter | ||
- (SMTableView *)tableView { | ||
if (!_tableView) { | ||
_tableView = [[SMTableView alloc] init]; | ||
} | ||
return _tableView; | ||
} | ||
|
||
- (UIView *)listView { | ||
if (!_listView) { | ||
_listView = [[UIView alloc] init]; | ||
} | ||
return _listView; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// SMSubscribeCellView.h | ||
// RSSRead | ||
// | ||
// Created by DaiMing on 15/11/25. | ||
// Copyright © 2015年 starming. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@class SMSubscribeCellViewModel; | ||
|
||
@interface SMSubscribeCellView : UIView | ||
|
||
- (instancetype)initWithSubscribeViewModel:(SMSubscribeCellViewModel *)subscribeViewModel; | ||
|
||
+ (CGFloat)heightForSubscribeCellView; | ||
@end |
Oops, something went wrong.