{"id":13685248,"url":"https://github.com/ptshih/PSCollectionView","last_synced_at":"2025-05-01T01:31:08.149Z","repository":{"id":2867631,"uuid":"3872956","full_name":"ptshih/PSCollectionView","owner":"ptshih","description":"A simple open source implementation of a Pinterest Pinboard for iOS","archived":false,"fork":false,"pushed_at":"2016-04-12T03:59:20.000Z","size":251,"stargazers_count":1394,"open_issues_count":25,"forks_count":322,"subscribers_count":136,"default_branch":"master","last_synced_at":"2025-04-07T15:09:00.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ptshih.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":"2012-03-30T03:15:54.000Z","updated_at":"2025-01-23T03:09:24.000Z","dependencies_parsed_at":"2022-07-30T07:17:59.570Z","dependency_job_id":null,"html_url":"https://github.com/ptshih/PSCollectionView","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/ptshih%2FPSCollectionView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptshih%2FPSCollectionView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptshih%2FPSCollectionView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptshih%2FPSCollectionView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptshih","download_url":"https://codeload.github.com/ptshih/PSCollectionView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251808421,"owners_count":21647288,"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:47.479Z","updated_at":"2025-05-01T01:31:07.933Z","avatar_url":"https://github.com/ptshih.png","language":"Objective-C","readme":"What is PSCollectionView?\n---\nIt's a Pinterest style scroll view designed to be used similar to a UITableView.\n\nIt supports Portrait and Landscape orientations.\n\nI built this as a hack to show my friends. Any suggestions or improvements are very welcome!\n\nComing soon... A fully functional demo app.\n\nWhat is PSCollectionViewCell?\n---\nIt's the equivalent of UITableViewCell\n\nIt implements base methods for configuring data and calculating height\n\n*Note: You should subclass this!*\n\nWant to see this code in a live app?\n---\nI use this in my iPhone/iPad app, Lunchbox.\n\n![Screenshot](http://a5.mzstatic.com/us/r1000/086/Purple/v4/b7/08/bb/b708bb3f-0775-67af-6765-e9f17e7384c4/mza_6463307710579208032.480x480-75.jpg)\n\nARC\n---\nFully ARC compatible now\n\nHow to use:\n---\nHere's an example of creating an instance of PSCollectionView\n\n    self.collectionView = [[PSCollectionView alloc] initWithFrame:CGRectZero];\n    self.collectionView.delegate = self; // This is for UIScrollViewDelegate\n    self.collectionView.collectionViewDelegate = self;\n    self.collectionView.collectionViewDataSource = self;\n    self.collectionView.backgroundColor = [UIColor clearColor];\n    self.collectionView.autoresizingMask = ~UIViewAutoresizingNone;\n\n**Setting number of columns**\n\n    // Specify number of columns for both iPhone and iPad\n    if (isDeviceIPad()) {\n        self.collectionView.numColsPortrait = 3;\n        self.collectionView.numColsLandscape = 4;\n    } else {\n        self.collectionView.numColsPortrait = 1;\n        self.collectionView.numColsLandscape = 2;\n    }\n\n**Add a header view**\n\n    UIView *headerView = ...\n    self.collectionView.headerView = headerView;\n\n**Add a footer view**\n\n    UIView *footerView = ...\n    self.collectionView.footerView = footerView;\n    \n**Reloading Data**\n    [self.collectionView reloadData];\n\n**Delegate and DataSource**\n\n    - (Class)collectionView:(PSCollectionView *)collectionView cellClassForRowAtIndex:(NSInteger)index {\n        return [PSCollectionViewCell class];\n    }\n\n    - (NSInteger)numberOfRowsInCollectionView:(PSCollectionView *)collectionView {\n        return 0;\n    }\n\n    - (UIView *)collectionView:(PSCollectionView *)collectionView cellForRowAtIndex:(NSInteger)index {\n        return nil;\n    }\n\n    - (CGFloat)collectionView:(PSCollectionView *)collectionView heightForRowAtIndex:(NSInteger)index {\n        return 0.0;\n    }\n\nLicense\n---\nCopyright (c) 2012 Peter Stone (https://www.impeterstone.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies 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\nTHE SOFTWARE.\n\nQuestions?\n---\nFeel free to send me an email if you have any questions implementing PSCollectionView!\n","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptshih%2FPSCollectionView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptshih%2FPSCollectionView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptshih%2FPSCollectionView/lists"}