{"id":13847865,"url":"https://github.com/1000Memories/TMQuiltView","last_synced_at":"2025-07-12T11:32:38.358Z","repository":{"id":4030329,"uuid":"5130801","full_name":"1000Memories/TMQuiltView","owner":"1000Memories","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-16T16:49:28.000Z","size":1063,"stargazers_count":569,"open_issues_count":14,"forks_count":120,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-10-19T12:50:21.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1000Memories.png","metadata":{"files":{"readme":"README.md","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-07-21T03:25:15.000Z","updated_at":"2024-06-06T15:49:12.000Z","dependencies_parsed_at":"2022-08-21T05:20:38.584Z","dependency_job_id":null,"html_url":"https://github.com/1000Memories/TMQuiltView","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/1000Memories%2FTMQuiltView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1000Memories%2FTMQuiltView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1000Memories%2FTMQuiltView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1000Memories%2FTMQuiltView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1000Memories","download_url":"https://codeload.github.com/1000Memories/TMQuiltView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225335461,"owners_count":17458282,"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-04T19:00:34.098Z","updated_at":"2024-11-21T23:30:44.514Z","avatar_url":"https://github.com/1000Memories.png","language":"Objective-C","readme":"TMQuiltView\n=======\n\nWe developed a quilt view for our [Shoebox app](http://itunes.apple.com/us/app/shoebox-by-1000memories/id472126139?mt=8)\n\n[![](http://s3.amazonaws.com/fromus/blog_posts/quilt-camera-ipad-small.png)](http://s3.amazonaws.com/fromus/blog_posts/quilt-camera-ipad.png)\n\nFeatures\n=======\n- Interface similar to the UITableView\n- Fully compatible with NSFetchedResultsController\n- Multiple columns\n- Customization of the margins\n- Number of column can depend on orientation\n- Handling of datasource changes (row insertion/removal)\n\nInstallation\n=======\n\n- Drag the TMQuiltView subfolder into your project\n- Import \"TMQuiltView.h\" wherever you need it\n- Subclass TMQuiltViewController.\n\nUsage\n=======\n\nBelow is the excerpt from the demo view controller which shows how easy it is to setup a TMQuiltView. \nYou can also directly open the TMQuiltViewDemo in Xcode and build the project.\n\n``` objective-c\n\n@interface TMDemoQuiltViewController ()\n\n@property (nonatomic, retain) NSArray *images;\n\n@end\n\n@implementation TMDemoQuiltViewController\n\n@synthesize images = _images;\n\n- (void)dealloc {\n    [_images release], _images = nil;\n    [super dealloc];\n}\n\n#pragma mark - UIViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    self.quiltView.backgroundColor = [UIColor blackColor];\n}\n\n- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation\n{\n    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {\n        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);\n    } else {\n        return YES;\n    }\n}\n\n#pragma mark - QuiltViewControllerDataSource\n\n- (NSArray *)images {\n    if (!_images) {\n        NSMutableArray *imageNames = [NSMutableArray array];\n        for(int i = 0; i \u003c kNumberOfCells; i++) {\n            [imageNames addObject:[NSString stringWithFormat:@\"%d.jpeg\", i % 10 + 1]];\n        }\n        _images = [imageNames retain];\n    }\n    return _images;\n}\n\n- (UIImage *)imageAtIndexPath:(NSIndexPath *)indexPath {\n    return [UIImage imageNamed:[self.images objectAtIndex:indexPath.row]];\n}\n\n- (NSInteger)quiltViewNumberOfCells:(TMQuiltView *)TMQuiltView {\n    return [self.images count];\n}\n\n- (TMQuiltViewCell *)quiltView:(TMQuiltView *)quiltView cellAtIndexPath:(NSIndexPath *)indexPath {\n    TMPhotoQuiltViewCell *cell = (TMPhotoQuiltViewCell *)[quiltView dequeueReusableCellWithReuseIdentifier:@\"PhotoCell\"];\n    if (!cell) {\n        cell = [[[TMPhotoQuiltViewCell alloc] initWithReuseIdentifier:@\"PhotoCell\"] autorelease];\n    }\n    \n    cell.photoView.image = [self imageAtIndexPath:indexPath];\n    cell.titleLabel.text = [NSString stringWithFormat:@\"%d\", indexPath.row + 1];\n    return cell;\n}\n\n#pragma mark - TMQuiltViewDelegate\n\n- (NSInteger)quiltViewNumberOfColumns:(TMQuiltView *)quiltView {\n\n    \n    if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft \n        || [[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight) {\n        return 3;\n    } else {\n        return 2;\n    }\n}\n\n- (CGFloat)quiltView:(TMQuiltView *)quiltView heightForCellAtIndexPath:(NSIndexPath *)indexPath {\n    return [self imageAtIndexPath:indexPath].size.height / [self quiltViewNumberOfColumns:quiltView];\n}\n\n@end\n\n```\n\nTODOs\n=======\n\n- ARC\n- Handle NSIndexPath sections\n- Interface is still limited compared to UITableView's\n- Better animations\n\nLicense\n=======\nTMQuiltView\n\nCopyright (c) 2012 1000memories\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, \nand/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR \nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER \nDEALINGS IN THE SOFTWARE.\n\nContact\n=======\n\nFeel free to reach to us at developers@1000memories.com.\n","funding_links":[],"categories":["C++","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1000Memories%2FTMQuiltView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1000Memories%2FTMQuiltView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1000Memories%2FTMQuiltView/lists"}