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

https://github.com/maximbilan/ios-frequency-table

iOS Frequency Table
https://github.com/maximbilan/ios-frequency-table

frequency-table ios ios-app objective-c ui ui-components uikit

Last synced: about 2 months ago
JSON representation

iOS Frequency Table

Awesome Lists containing this project

README

          

iOS Frequency Table
===================

A frequency simple table control.



![alt tag](https://raw.github.com/maximbilan/ios_frequency_table/master/img/img1.png)
## Installation
Add the next source files to your project:


FrequencyTable.h
FrequencyTable.m

## Using

You can add view in the Interface Builder and set a class to FrequencyTable or create in the code:


FrequencyTable *frequencyTable = [[FrequencyTable alloc] initWithPositionWithX:0
withY:0
isWideScreen:YES];
[self.view addSubview:frequencyTable];

For adding table data, you can use the following code:


NSMutableArray *array = [[NSMutableArray alloc] init];

float total = 0.0;
for (NSInteger i = 0; i < 50; ++i) {
FrequencyTableRecord *record = [[FrequencyTableRecord alloc] init];
record.name = [NSString stringWithFormat:@"Item %d", i];
record.value = RAND_FROM_TO(1, 500);
total += record.value;
[array addObject:record];
}

[self.frequencyTable setData:array withTotal:total];