• Stars
    star
    170
  • Rank 223,357 (Top 5 %)
  • Language
    Objective-C
  • Created about 13 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A 2D table view for iOS apps! This is the demo.

MDSpreadView Demo

Screenshot

Purpose

MDSpreadView is a rewrite of UIKit's 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 :)

Installation

$ 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 [email protected]:mochidev/MDSpreadView.git <local_subpath>/MDSpreadView

This will allow you to update it at anytime by running $ git submodule update.

Usage

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 delegate and dataSource properties of your MDSpreadView instance to one of your objects, much like you would do for a UITableView.

Then, implement the datasource and delegate methods demonstrated in MDViewController.m.

Don't forget to add QuartzCore.framework to your project!

Notes

  • An MDSpreadViewCell is created just like a UITableViewCell is -- 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 - reloadData hang).
  • 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
  • MDSpreadView uses MDIndexPaths instead of NSIndexPath to index cells.
  • Not all APIs are fully implemented yet, and are there for future reference only.
  • MDSpreadView also offers an easier way to make cells via - spreadView:title... and - spreadView:objectValue... datasource methods. The cell classes used can be changed via the default...CellClass quartet of properties.
  • MDSpreadView also has support for footer columns and rows.
  • Unlike UITableView, MDSpreadView is not adversely affected by custom cell sizes.

To Do

  • Programatic scrolling
  • Info Querying
  • Copy-Paste menu support
  • Cell insertion, deletion, and reload
  • Class registration per identifier
  • Better animation between data set transitions

Coding Style Guidelines

Please see https://mochidev.com/codestyle

License

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:

  1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  2. 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!)

Credits

More Repositories

1

MDSpreadView

A 2D table view for iOS apps!
Objective-C
128
star
2

MDAboutController

Automatically populated about view controller for iOS apps!
Objective-C
110
star
3

MDAboutControllerDemo

Automatically populated about view controller for iOS apps! This is the demo.
Objective-C
55
star
4

Bytes

Swift Library for working with sequences of Bytes (aka [UInt8])
Swift
39
star
5

URLSessionBackport

Backward compatible async/await for URLSession!
Swift
37
star
6

XCTAsync

Swift library to more easily test async code
Swift
35
star
7

MDBlurViewDemo

Auto-bluring and masking backdrop view for your iOS 7 apps! This is the demo.
Objective-C
24
star
8

MDBlurView

Auto-bluring and basking backdrop view for your iOS 7 apps! This is the demo.
Objective-C
19
star
9

CodableDatastore

An ACID-compliant database written in pure-swift enabling on-disk persistence for apps and services.
Swift
18
star
10

MDAccordianViewDemo

Fancy folding superview for iOS apps! This is the demo.
Objective-C
13
star
11

MDSectionedTableView

iOS-like UITableView for Mac OS X
Objective-C
11
star
12

AsyncSequenceReader

Building blocks to easily consume Swift's `AsyncSequence`.
Swift
10
star
13

MDSectionedTableViewDemo

iOS-like UITableView for Mac OS X. This is the demo.
Objective-C
9
star
14

SSLTest

Experiment with TLS and AsyncSockets!
Objective-C
9
star
15

MDAccordianView

Fancy folding superview for iOS apps!
Objective-C
6
star
16

MDPageControlDemo

A better UIPageControl! This is the demo.
Objective-C
5
star
17

HostRouter

A Vapor middleware for including domains in routing
Swift
4
star
18

Pixelitis

Find dead pixels in style!
Objective-C
3
star
19

DynamicCodable

Easily preserve arbitrary Codable data structures when unarchiving
Swift
2
star
20

swift-server-benchmarks

Swift
1
star
21

NotPhoLocalizations

Localizations for the NotPho app
1
star