Navigation Menu

Skip to content

chucklab/MCCommonTableView

Repository files navigation

MCCommonTableView

License MIT Carthage compatible Pod Version Pod Platform Support Build Status Coverage Status Reference Status

A table view for common use, have fun.

Screen-Shot-01-w100

Installation

Cocoapods:

  1. Add pod 'MCCommonTableView', '~> 0.0.1' to your Podfile.
  2. Run pod install or pod update.
  3. Import <MCCommonTableView.h>.

Carthage:

  1. Add github "chucklab/MCCommonTableView" to your Cartfile.
  2. Run carthage update --platform ios and add the framework to your project.
  3. Import <MCCommonTableView/MCCommonTableView.h>.

Usage

// Example
MCCommonTableView *tableView = [MCCommonTableView tableViewWithFrame:self.view.bounds];
[self.view addSubview:tableView];
tableView.dataMap = @{
                      @"Day One" : @{
                              @"1. Normal" : ^(){ NSLog(@"Normal, tapped."); },
                              @"2. Multi lines" : ^(){ NSLog(@"Multi, tapped."); },
                              @"3. Long single line" : ^(){ NSLog(@"Long, tapped."); },
                              @"4. Very long text" : ^(){ NSLog(@"Very, tapped."); },
                              @"5. No message" : ^(){ NSLog(@"No, tapped."); }
                              },
                      @"Day two" : @{
                              @"1. Normal" : ^(){ NSLog(@"Normal, tapped."); },
                              @"2. Multi lines" : ^(){ NSLog(@"Multi, tapped."); },
                              @"3. Long single line" : ^(){ NSLog(@"Long, tapped."); },
                              @"4. Very long text" : ^(){ NSLog(@"Very, tapped."); },
                              @"5. No message" : ^(){ NSLog(@"No, tapped."); }
                              }
                      };

Requirements

This library requires a deployment target of iOS 6.0 or greater.

License

MCCommonTableView is provided under the MIT license. See LICENSE file for details.

About

A table view for common use, have fun.

Resources

License

Stars

Watchers

Forks

Packages

No packages published