blob: dcf4aca2edb7b1f73524a4b6ff1750141dbf1041 [file] [log] [blame]
{
"name": "SCPagingGridView",
"version": "0.0.1",
"summary": "SCPagingGridView is a collection of iOS viewcontroller containers, views, & helpers.",
"description": "SCPagingGridView\n===\n\nSCPagingGridView is a collection of iOS UIViewController containers, views, & helpers. The project is comprised of the following components:\n\nSCPageViewController\n---\nA custom page view controller that supports both horizontal & vertical paging.\n\nSCGridView\n---\nA UIView sublcass that lays out its children according to a given schema.\n\nScreen shot:\n\n<img src=\"http://static.scribd.com.s3.amazonaws.com/github/gridview.png\" height=\"480\" width=\"320\" alt=\"iPhone example\" />\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<img src=\"http://static.scribd.com.s3.amazonaws.com/github/paging_gridview_iphone.png\" height=\"480\" width=\"320\" alt=\"iPhone example\" />\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 -> Build Phases -> 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&mt=8](http://itunes.apple.com/us/app/scribd-worlds-largest-online/id542557212?ls=1&mt=8)\n",
"homepage": "https://github.com/gotosleep/SCPagingGridView",
"license": {
"type": "MIT",
"text": "Permission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
},
"authors": "Jesse Andersen",
"platforms": {
"ios": "5.0"
},
"source": {
"git": "https://github.com/gotosleep/SCPagingGridView.git",
"commit": "032a34dd3677c5de78eff2b2bd0c0f801f3f8bcf"
},
"source_files": [
"Source",
"Source/**/*.{h,m}"
],
"requires_arc": true
}