{"id":18270561,"url":"https://github.com/gotosleep/SCPagingGridView","last_synced_at":"2025-04-05T01:30:42.965Z","repository":{"id":5316367,"uuid":"6498859","full_name":"gotosleep/SCPagingGridView","owner":"gotosleep","description":"SCPagingGridView is a collection of iOS viewcontroller containers, views, \u0026 helpers.","archived":false,"fork":true,"pushed_at":"2016-02-17T16:16:46.000Z","size":143,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-17T04:06:32.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"scribd/SCPagingGridView","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gotosleep.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-01T23:52:20.000Z","updated_at":"2016-10-24T11:35:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gotosleep/SCPagingGridView","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/gotosleep%2FSCPagingGridView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotosleep%2FSCPagingGridView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotosleep%2FSCPagingGridView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotosleep%2FSCPagingGridView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotosleep","download_url":"https://codeload.github.com/gotosleep/SCPagingGridView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276022,"owners_count":20912285,"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-11-05T11:38:43.734Z","updated_at":"2025-04-05T01:30:42.537Z","avatar_url":"https://github.com/gotosleep.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"SCPagingGridView\n===\n\nSCPagingGridView is a collection of iOS UIViewController containers, views, \u0026 helpers. The project is comprised of the following components:\n\nSCPageViewController\n---\nA custom page view controller that supports both horizontal \u0026 vertical paging.\n\nSCGridView\n---\nA UIView sublcass that lays out its children according to a given schema.\n\nScreen shot:\n\n\u003cimg src=\"http://static.scribd.com.s3.amazonaws.com/github/gridview.png\" height=\"480\" width=\"320\" alt=\"iPhone example\" /\u003e\n\nSample Code:\n\n```\n@implementation SCExampleGridViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    self.view.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];\n    \n    CGFloat height = floorf(self.view.bounds.size.height * .8f);\n    CGFloat width = floorf(self.view.bounds.size.width * .8f);\n    \n    SCGridView *grid = [[SCGridView alloc] initWithFrame:CGRectMake(floorf((self.view.bounds.size.width - width)/2.0f), floorf((self.view.bounds.size.height - height)/2.0f), width, height)];\n    grid.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;\n    grid.layer.cornerRadius = 6.0f;\n    grid.clipsToBounds = YES;\n    grid.backgroundColor = [UIColor clearColor];\n    grid.schema = @[ @(1), @(1), @(2) ];\n    grid.rowSpacing = 5.0f;\n    grid.colSpacing = 5.0f;\n    [self.view addSubview:grid];\n    \n    NSMutableArray *cells = [[NSMutableArray alloc] initWithCapacity:grid.size];\n\n    UILabel *label = [[UILabel alloc] init];\n    label.textAlignment = UITextAlignmentCenter;\n    label.text = @\"1st cell\";\n    [cells addObject:label];\n    \n    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];\n    [button setTitle:@\"2nd cell\" forState:UIControlStateNormal];\n    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];\n    [button setTitleColor:[UIColor blueColor] forState:UIControlStateHighlighted];\n    button.backgroundColor = [UIColor whiteColor];\n    [cells addObject:button];\n    \n    label = [[UILabel alloc] init];\n    label.numberOfLines = 0;\n    label.textAlignment = UITextAlignmentCenter;\n    label.text = @\"3rd cell\";\n    [cells addObject:label];\n    \n    label = [[UILabel alloc] init];\n    label.numberOfLines = 0;\n    label.textAlignment = UITextAlignmentCenter;\n    label.text = @\"4th cell\";\n    [cells addObject:label];\n    \n    grid.cells = cells;\n}\n\n@end\n```\n\nSCPagingGridViewController\n---\nA view controller container that supports laying out a series of cells in pageable grid views.\n\nScreen shot:\n\n\u003cimg src=\"http://static.scribd.com.s3.amazonaws.com/github/paging_gridview_iphone.png\" height=\"480\" width=\"320\" alt=\"iPhone example\" /\u003e\n\nSCViewRecycler\n---\nA class that recycles views. It is similar to UITableView's reusable cells system, but can be used for any view type.\n\nUsage\n---\n\nTo use SCPagingGridView, add the ``` source/ ``` files into your XCode Project. The preferred method is to setup a git submodule and reference the files in your Xcode project. ` git submodule add https://github.com/scribd/SCPagingGridView.git SCPagingGridView `\n\nRequirements\n---\n\nSCPagingGridView requires iOS 5.0+ and Xcode 4.3+ The projects uses ARC, but it may be used with non-ARC projects by setting the: ` -fobjc-arc ` compiler flag on the ` *.m ` files. You can set this flag under Target -\u003e Build Phases -\u003e Compile Sources\n\nApps\n---\nSCPagingGridView is used in the following apps:\n\n* Scribd - [http://itunes.apple.com/us/app/scribd-worlds-largest-online/id542557212?ls=1\u0026mt=8](http://itunes.apple.com/us/app/scribd-worlds-largest-online/id542557212?ls=1\u0026mt=8)\n\nLicense\n---\n\n```\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of\n this software and associated documentation files (the \"Software\"), to deal in\n the Software without restriction, including without limitation the rights to\n use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n of the Software, and to permit persons to whom the Software is furnished to do\n so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n \n ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotosleep%2FSCPagingGridView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotosleep%2FSCPagingGridView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotosleep%2FSCPagingGridView/lists"}