bytesking/ElegantTableView

ElegantTableView


License
MIT

Documentation

CocoaPods

ElegantTableView

优雅的创建TableView

Cocoapods

a. Add ElegantTableView to your Podfile.

	pod 'ElegantTableView'

b. Run

  	pod install 

Carthage

a. Add ElegantTableView to your Cartfile.

    github "stackhou/ElegantTableView"

b. Run

    carthage update

c. Follow the rest of the standard Carthage installation instructions to add ElegantTableView to your project.

Use

    NSArray *dataSources = @[@"", @"", @"", @"1", @"2", @"3"];
    UITableView *tableView = [[ElegantTableViewGenerator shareInstance] createWithFrame:self.view.bounds titles:dataSources subTitles:nil rowHeight:44 didSelectRowBlock:^(UITableView *tableView, NSIndexPath *indexPath) {
        NSLog(@"点击TableView-->%ld", (long)indexPath.row);
    } didScrollBlock:^(UIScrollView *tableView, CGPoint contentOffset) {
        NSLog(@"滚动TableView-->%@", NSStringFromCGPoint(contentOffset));
    }];
    
    [self.view addSubview:tableView];