MDSpreadView is a rewrite of
UITableView that allows for the display
of columns and column headers as well as rows. This repository serves to
demonstrate and test the
MDSpreadView class. Please visit the
MDSpreadView repository for the
actual code :)
$ git clone https://github.com/mochidev/MDSpreadViewDemo --recursive
To include it into your projects either download the source, or run the following on your git repo:
$ cd <your_repo> $ git submodule add firstname.lastname@example.org:mochidev/MDSpreadView.git <local_subpath>/MDSpreadView
This will allow you to update it at anytime by running
$ git submodule update.
Simply add the
MDSpreadView submodule to
your project, add
#import "MDSpreadViewClasses.h" to the top of the files you
wish to use MDSpreadView in, and set the
MDSpreadView instance to one of your objects, much like you would do
Then, implement the datasource and delegate methods demonstrated in
Don't forget to add
QuartzCore.framework to your project!
MDSpreadViewCellis created just like a
UITableViewCellis -- try to dequeue it from the spread view, otherwise create a new one, then configure and return.
- The table headers are also made of cells, and are loaded just like MDTableViewCells are.
- Works flawlessly with ~500 billion data points (anything bigger makes
- The bigger the cells, the faster it scrolls, since less are onscreen at a
time (especially on older hardware).
- ~150 cells gives 60 fps on current hardware, though you can viably push to 600 cells for ~25 fps
MDIndexPaths instead of
NSIndexPathto index cells.
- Not all APIs are fully implemented yet, and are there for future reference only.
MDSpreadViewalso offers an easier way to make cells via
- spreadView:objectValue...datasource methods. The cell classes used can be changed via the
default...CellClassquartet of properties.
MDSpreadViewalso has support for footer columns and rows.
- Unlike UITableView, MDSpreadView is not adversely affected by custom cell sizes.
- Persistant row selection
- Better header selection
- Column sorting
- Programatic scrolling
- Info Querying
- Copy-Paste menu support
Please see https://mochidev.com/codestyle
Copyright (c) 2014 Dimitri Bouniol, Mochi Development, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software, associated artwork, and documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- Neither the name of Mochi Development, Inc. nor the names of its contributors or products may be used to endorse or promote products derived from this software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Mochi Dev, and the Mochi Development logo are copyright Mochi Development, Inc.
Also, it'd be super awesome if you credited this page in your about screen :)
(We do this for you in MDAboutController!)