{"id":13685328,"url":"https://github.com/kolinkrewinkel/KKGridView","last_synced_at":"2025-05-01T04:30:38.008Z","repository":{"id":56917296,"uuid":"2095417","full_name":"kolinkrewinkel/KKGridView","owner":"kolinkrewinkel","description":"Deprecated: Grid view library for iOS.","archived":false,"fork":false,"pushed_at":"2012-06-20T04:18:57.000Z","size":4901,"stargazers_count":815,"open_issues_count":45,"forks_count":151,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-20T04:56:09.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/kolinkrewinkel/KKGridView","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kolinkrewinkel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-24T03:24:15.000Z","updated_at":"2025-04-01T06:01:00.000Z","dependencies_parsed_at":"2022-08-21T03:50:42.722Z","dependency_job_id":null,"html_url":"https://github.com/kolinkrewinkel/KKGridView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolinkrewinkel%2FKKGridView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolinkrewinkel%2FKKGridView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolinkrewinkel%2FKKGridView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolinkrewinkel%2FKKGridView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kolinkrewinkel","download_url":"https://codeload.github.com/kolinkrewinkel/KKGridView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251824049,"owners_count":21649793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T14:00:48.913Z","updated_at":"2025-05-01T04:30:37.703Z","avatar_url":"https://github.com/kolinkrewinkel.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"readme":"\u003cdiv style=\"width:768px; height: 200px; position: relative; margin: 0 auto;\"\u003e \n\u003cimg style=\"position: relative; width: 768px; height: 200px; margin: 0;\" src=\"http://f.cl.ly/items/1c230w0U2d3H3I021338/KKGridViewBanner.png\" alt=\"KKGridView\"/\u003e\n\u003c/div\u003e\n\n###Deprecated\nIn iOS 6, Apple has now created a first-party solution to what KKGridView tries to solve.  See Session 219 from WWDC 2012 for more information.\n\n###Overview\nHigh-performance iOS grid view (MIT license). **Requirements**: you\nneed to build `KKGridView` with a compiler that supports *Automatic\nReference Counting*. We know this stings at first, but we strongly\nbelieve that the future is better served by requiring this\nnow. Moreover, the move to ARC improved `KKGridView`'s performance\ngreatly. Remember that your project need not use ARC to include\n`KKGridView`.\n\n### Contributing\nIf you see something you don't like, you are always\nwelcome to submit it as an issue. But if you can find it in your\nheart, we'd be so grateful if you would fix it yourself and send us a\npull request. We promise not to bite!\n\n\n##Current Issues\n\nMost features, bugs, and missing items for the project are in the\nIssues section.  Currently, there are placement issues after\ninserting.  We were initially going to fix these before public\nrelease, but instead decided to release now and allow outside\ncontribution.  Other than that, editing and selection are the only\nthings that need work.\n\n##Motivations\n\n`KKGridView` was created in July 2011 for usage in a few of the apps I\nwas working on.  When I discovered that this would be both very\ndifficult and time consuming, I sought out the help of [Giulio\nPetek](http://twitter.com/GiloTM) and [Jonathan\nSterling](http://twitter.com/jonsterling).  Additionally, we brought\non [Kyle Hickinson](http://twitter.com/kylehickinson), [Matthias\nTretter](http://twitter.com/myell0w), and most recently, [Peter\nSteinberger](http://twitter.com/steipete). We had all been frustrated\nby the existing grid view components; with this in mind, we set out to\ncreate the best grid view component available for iOS to-date.\n\n##Goals\n\nWhen we set out building this, we all had a few common things we knew we needed to focus on.\n\n* Performance — 55+ FPS in the worst case.\n* `UITableView` similarities — Strive to be as close to drop-in as possible.\n* Feature completeness — As above, match the latest UITableView implementation in features; add anything else worthwhile.\n* Solid codebase — We didn't want something that was inextensible and \nfull of messy code.\n\n##Project Integration\n\n* Create a new workspace in Xcode in the same directory as your existing *.xcodeproj.\n* Drag in your existing Xcode project.\n* Locate your copy of KKGridView, drag KKGridView.xcodeproj into the workspace so that it stays at the top of the hierarchy, just like your original project.\n* In the Build Phases section of your original project, link your project with libKKGridView.a.\n* Now, simply import KKGridView just like an Apple framework:\n\n~~~~objc\n#import \u003cKKGridView/KKGridView.h\u003e\n~~~~\n* You can do this wherever necessary, though we think it's best to simply import in your prefix (.pch) file.\n\n##Usage\n\nKKGridViewController, like UITableViewController, can automatically instantiate a grid view for you.  Simply subclass it and customize away.  \n\n**As an alternative, one can perform custom instantiation, as shown below.**\n\nFirst, instantiate a grid view instance.  *Using the designated initializer and a `_gridView` ivar:*\n\n~~~~objc\n_gridView = [[KKGridView alloc] initWithFrame:self.view.bounds dataSource:self delegate:self];\n~~~~\n\nNow, you can setup your default `UIScrollView` and `UIView` properties, since `KKGridView` inherits from said class.\n\n~~~~objc\n_gridView.scrollsToTop = YES;\n_gridView.backgroundColor = [UIColor darkGrayColor];\n_gridView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n~~~~\n\nMetrics must also be set (automatic sizing *may* come in the future).\n\n~~~~objc\n_gridView.cellSize = CGSizeMake(75.f, 75.f);\n_gridView.cellPadding = CGSizeMake(4.f, 4.f);\n~~~~\n\nNow, other properties available in the header file can be set.\n\n~~~~objc\n_gridView.allowsMultipleSelection = NO;\n\nUIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 50.f)];\nheaderView.backgroundColor = [UIColor redColor];\n_gridView.gridHeaderView = headerView;\n[headerView release] /* For the non-ARC users amongst us */\n~~~~\n\nFinally, you can set the grid as your view.\n\n~~~~objc\nself.view = _gridView;\n~~~~\n\nAlternatively, you can add the grid to your view-hierarchy.\n\n~~~~objc\n[self.view addSubview:_gridView];\n~~~~\n\n###Data source methods:\n\n~~~~objc\n- (NSUInteger)gridView:(KKGridView *)gridView numberOfItemsInSection:(NSUInteger)section\n{\n  return kCellCounts[section];\n}\n~~~~\n\nOptionally, you can specify how many section you would like in the grid. *(Default is 1)*\n\n~~~~objc\n- (NSUInteger)numberOfSectionsInGridView:(KKGridView *)gridView\n{\n  return kNumSections;\n}\n~~~~\n\nThe last required method is to return a cell, just like UITableView.\nWe've made it easier on you, though. `KKIndexPath` works in just the\nsame way as `NSIndexPath`, only `-row` is replaced with\n`-index`. `KKGridViewCell`, like `UITableViewCell`, is designed to be\nsubclassed.*\n\n~~~~objc\n- (KKGridViewCell *)gridView:(KKGridView *)gridView cellForItemAtIndexPath:(KKIndexPath *)indexPath\n{\n  KKGridViewCell *cell = [KKGridViewCell cellForGridView:gridView];\n  cell.backgroundColor = [UIColor lightGrayColor];\n  return cell;\n}\n~~~~\n\nThere are no required delegate methods, though all that are implemented in `UITableView` will soon be available in `KKGridView`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkolinkrewinkel%2FKKGridView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkolinkrewinkel%2FKKGridView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkolinkrewinkel%2FKKGridView/lists"}