// // GridView.h // // Created by Tyler Neylon on 7/24/09. // Copyright 2009 Bynomial. All rights reserved. // // Lays out subviews in a grid, in (English) reading order // (left-to-right, then top-down) according to the order of // added subviews. Assumes every item within each row has // the same height, and each item within each column has // the same width. // // Example usage: // GridView* gridView = [[GridView be] initWithRows:X cols:Y]; // for (int i = 0; i < X * Y; ++i) { // [gridView addSubview:[self createButton:i]]; // } // [myView addSubview:gridView]; // #import @interface GridView : UIView { int rows; int cols; int* rowHeight; int* colWidth; } - (id) initWithRows: (int) rows_ cols: (int) cols_; @end