WCGridView
A Very simple drop in Grid View for iOS, modeled after UITableView/UITableViewController
Install / Use
/learn @wess/WCGridViewREADME
WCGridView
WCGridView is a drop in View and Controller for creating simple and scrollable Grids for iOS applications. It's modeled very closely after UITableView/UITableViewController so getting up and going should be fairly easy.
Using the WCGridViewController
Start with creating a UIViewController file, then include WCGridViewController.h and have your newly created view controller extend it.
You will need to override the dataSource and delegate Methods:
- (NSInteger)numberOfRowsForGridView:(WCGridView *)gridView;
- (NSInteger)gridView:(WCGridView *)gridView numberOfColumnsForRowAtIndex:(NSInteger)index;
- (WCGridViewCell *)gridView:(WCGridView *)gridView cellForGridIndexPath:(WCGridIndexPath)indexPath;
To interact with selected cells you can implement the optional delegate method:
- (void)gridView:(WCGridView *)gridView didSelectCellAtIndexPath:(WCGridIndexPath)indexPath;
To create custom cells, you can just subclass WCGridViewCell. Currently WCGridViewCell uses layoutsubiews, but you could easily use drawrect instead. When subclassing, it is suggested to use initWithReuseIdentifier:(NSString *)reuseIdentifier to setup cell caching.
Notes:
- This project uses ARC
- This is still in early stages
If you have an suggestions, contributes, etc.. Feel free to send me a message here and I will do what I can to get back with ya.
Thanks, Wess
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
