mutualmobile / MMSpreadsheetView

MIT License
193 stars 34 forks source link

Mutual Mobile Spreadsheet View

MMSpreadsheetView is a configurable spreadsheet-like view. Depending on the initial header row or column configuration, up to four collection views will be coordinated to provide the user interface. Although originally designed for use on iPad in full-screen, it scales down well for use in smaller views.


Documentation

Official appledoc documentation can be found at CocoaDocs.


Installing MMSpreadsheetView

Badge w/ Version Badge w/ Platform You can install MMSpreadsheetView in your project by using CocoaPods:

pod 'MMSpreadsheetView', '~> 0.0.3'

Initializing a Spreadsheet View

The designated initializer for MMSpreadsheetView requires passing in the number of header rows and columns as well as the initial bounds rect. Register the cell classes you will be using and set the delegate and dataSource. Finally, add the view as a subview.

// Create the spreadsheet in code.
MMSpreadsheetView *spreadSheetView = [[MMSpreadsheetView alloc] initWithNumberOfHeaderRows:1 numberOfHeaderColumns:1 frame:self.view.bounds];

// Register your cell classes.
[spreadSheetView registerCellClass:[MMGridCell class] forCellWithReuseIdentifier:@"GridCell"];
[spreadSheetView registerCellClass:[MMTopRowCell class] forCellWithReuseIdentifier:@"TopRowCell"];
[spreadSheetView registerCellClass:[MMLeftColumnCell class] forCellWithReuseIdentifier:@"LeftColumnCell"];

// Set the delegate & datasource spreadsheet view.
spreadSheetView.delegate = self;
spreadSheetView.dataSource = self;

// Add the spreadsheet view as a subview.
[self.view addSubview:spreadSheetView];
self.spreadSheetView = spreadSheetView;

Caveats


Credit

Designed and Developed by these fine folks at Mutual Mobile:

Development


Feedback

We'd love to hear feedback on the library. Create Github issues, or hit us up on Twitter.


License License MIT

MMSpreadsheetView is available under the MIT license. See the LICENSE file for more info.