8000 GitHub - andrei512/APTableController: The best way to create tables in iOS
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

andrei512/APTableController

Repository files navigation

APTableController

I started working on a tutorial and this article that gets into more depth.

Quick Examples

A simple cell

[self.tableController reloadWithData:@"A simple cell"];

One cell

Many cells

[self.tableController reloadWithData:@[@"cell #1", @"cell #2", @"cell #3"]];

Many cells

Custom loading

[self.tableController reloadWithData:@[
    @{
        kObject : @"cell #1",
        kOnLoad : ^(APTableCell *cell) {
            cell.textLabel.textColor = [UIColor redColor];
        }
    },
    @"cell #2",
    @"cell #3"
]];

Many cells with color

Handling didSelect

[self.tableController reloadWithData:@[
    @{
        kObject : @"cell #1",
        kOnSelect : ^{
            [[[UIAlertView alloc] initWithTitle:@"Hello World!"
                                       message:nil
                                      delegate:nil
                             cancelButtonTitle:@"OK"
                              otherButtonTitles:nil] show];
        }
    },
    @"cell #2",
    @"cell #3"
]];

Many cells with action

Many sections

[self.tableController reloadWithData:@[
    @[@"cell #1.1", @"cell #1.2", @"cell #1.3"],
    @[@"cell #2.1", @"cell #2.2", @"cell #2.3"],
    @[@"cell #3.1", @"cell #3.2", @"cell #3.3"],
]];

Many sections

What APTableController does for you

conventions

cellIdentifier

cell height - just change the cell frame

etc.

Bitdeli Badge

About

The best way to create tables in iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0