An open API service indexing awesome lists of open source software.

https://github.com/badchoice/gstableviewlib

A sensible tableview open implementation
https://github.com/badchoice/gstableviewlib

Last synced: about 1 year ago
JSON representation

A sensible tableview open implementation

Awesome Lists containing this project

README

          

# GSTableViewLib
An easy and fast way to create UITableViewControllers with live models update

##Insallation

####Using pods
```
pod 'GSTableViewLib', :git => 'https://github.com/BadChoice/GSTableViewLib.git'
```

####Manual
Download the source and copy the GSTableViewLib folder into your project


##Usage

Just extend ```GSTableViewController``` and only add the ```setup``` method

```
-(void)setup{
[super setup];

GSTableViewSection* firstSection = [[GSTableViewSection alloc] init];
firstSection.header = @"First section";

[firstSection addCell:[GSSwitchCell cellWithText:@"Enabled"
andObject:self.sampleModel
andKey:@"enabled"]];

GSTableViewSection* secondSection = [[GSTableViewSection alloc] init];
secondSection.header = @"Second section";

[secondSection addCell:[GSSelectCell cellWithText:@"Select string"
andObject:self.sampleModel
andKey:@"select"
andSelect:@[@"Amazing",@"Great",@"Good",@"Normal",@"Poor",@"Shit"]
]];

[self addSection:firstSection];
[self addSection:secondSection];
}
```

Check the sample project for a more detailed example

#####Available cell types:

```GSDateCell```
```GSLabelCell```
```GSNumberCell```
```GSFloatCell```
```GSTextFieldCell```
```GSSwitchCell```
```GSStepperCell```
```GSSegmentedCell```
```GSDateCell```
```GSDetailCell```
```GSSelectCell```
```GSButtonCell```