GitHub:HeYang | Blog:HeYang(Chinese)
- Drag all source files under floder
ExpandableTableView
to your project.【将ExpandableTableView
文件夹中的所有源代码拽入项目中】 - Import the main header file:
#import "ExpandableTableView.h"
【导入主头文件:#import "ExpandableTableView.h"
】
- How to use?
####Use Simple Example: In file 'ViewController.m'
#import "ViewController.h"
#import "ExpandableTableView.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
//1、创建ExpandableTableView
ExpandableTableView* extb = [[ExpandableTableView alloc] initWithFrame:self.view.frame];
//2、设置origin,主要是考虑在有状态栏的情况,就让他下移20
extb.origin = CGPointMake(0, 20);
//3、添加到父控件
[self.view addSubview:extb];
}
@end
1、Intrduction Plist file configuration:
2、Copy plist item: