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
- Host: GitHub
- URL: https://github.com/badchoice/gstableviewlib
- Owner: BadChoice
- Created: 2015-02-27T11:29:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-04T22:47:44.000Z (almost 10 years ago)
- Last Synced: 2025-02-16T16:58:08.138Z (over 1 year ago)
- Language: Objective-C
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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```