├── TableViewDescription ├── en.lproj │ └── InfoPlist.strings ├── .DS_Store ├── JMOSectionView.h ├── JMOTableViewCellRed.h ├── JMOTableViewCellBlue.h ├── JMOTableViewNibCell.h ├── JMOTableViewCellGreen.h ├── JMOTableViewDescription │ ├── JMOTableViewDescriptionCell.m │ ├── JMOTableViewDescriptionCell.h │ ├── JMOTableViewSectionView.m │ ├── JMOTableViewSectionView.h │ ├── JMOTableViewDescriptionUI.h │ ├── JMOTableViewDescriptionControllers.h │ ├── JMOTableViewDescriptionModels.h │ ├── UITableView+TableViewDescription.h │ ├── JMOTableViewDescriptionCellUpdate.h │ ├── JMOTableViewDescriptionSectionUpdate.h │ ├── JMOTableViewDescriptionController.h │ ├── JMOViewControllerWithTableViewDescription.h │ ├── JMOTableViewDescriptionDelegate.h │ ├── JMOTableViewDescriptionHeaders.h │ ├── JMOTableViewRowDescription.h │ ├── JMOTableViewSectionDescription.h │ ├── JMOTableViewDescription.h │ ├── JMOTableViewRowDescription.m │ ├── JMOTableViewSectionDescription.m │ ├── UITableView+TableViewDescription.m │ ├── JMOTableViewDescription.m │ ├── JMOTableViewDescriptionController.m │ └── JMOViewControllerWithTableViewDescription.m ├── JMOAppDelegate.h ├── JMOViewController.h ├── TableViewDescription-Prefix.pch ├── JMODemoTableViewDescription.h ├── main.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── JMOTableViewNibCell.m ├── JMOTableViewCellRed.m ├── JMOTableViewCellBlue.m ├── JMOTableViewCellGreen.m ├── JMOSectionView.m ├── TableViewDescription-Info.plist ├── JMOTableViewNibCell.xib ├── JMOAppDelegate.m ├── JMOViewController.m ├── Base.lproj │ └── Main.storyboard └── JMODemoTableViewDescription.m ├── TableViewDescriptionTests ├── en.lproj │ └── InfoPlist.strings ├── TableViewDescriptionTests-Info.plist └── TableViewDescriptionTests.m ├── screenshots ├── concept.png ├── screenshot1.png └── screenshot2.png ├── TableViewDescription.xcodeproj ├── xcuserdata │ ├── jeromemorissard.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── TableViewDescription.xcscheme │ └── J.COUDSI.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── TableViewDescription.xcscheme ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── J.COUDSI.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── jeromemorissard.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ ├── TableViewDescription.xccheckout │ │ └── TableViewDescription.xcscmblueprint └── project.pbxproj ├── LICENCE ├── JMOTableViewDescription.podspec ├── README.md └── Launch Screen.storyboard /TableViewDescription/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /TableViewDescriptionTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /screenshots/concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/HEAD/screenshots/concept.png -------------------------------------------------------------------------------- /screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/HEAD/screenshots/screenshot1.png -------------------------------------------------------------------------------- /screenshots/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/HEAD/screenshots/screenshot2.png -------------------------------------------------------------------------------- /TableViewDescription/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/HEAD/TableViewDescription/.DS_Store -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/xcuserdata/jeromemorissard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.xcworkspace/xcuserdata/J.COUDSI.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/HEAD/TableViewDescription.xcodeproj/project.xcworkspace/xcuserdata/J.COUDSI.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.xcworkspace/xcuserdata/jeromemorissard.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/HEAD/TableViewDescription.xcodeproj/project.xcworkspace/xcuserdata/jeromemorissard.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TableViewDescription/JMOSectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOSectionView.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewSectionView.h" 10 | 11 | @interface JMOSectionView : JMOTableViewSectionView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewCellRed.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewCellRed.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescriptionCell.h" 10 | 11 | @interface JMOTableViewCellRed : JMOTableViewDescriptionCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewCellBlue.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewCellBlue.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescriptionCell.h" 10 | 11 | @interface JMOTableViewCellBlue : JMOTableViewDescriptionCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewNibCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewNibCell.h 3 | // TableViewDescription 4 | // 5 | // Created by jerome morissard on 16/10/2016. 6 | // Copyright © 2016 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescriptionCell.h" 10 | 11 | @interface JMOTableViewNibCell : JMOTableViewDescriptionCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewCellGreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewCellGreen.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescriptionCell.h" 10 | 11 | @interface JMOTableViewCellGreen : JMOTableViewDescriptionCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionCell.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescriptionCell.h" 10 | 11 | @implementation JMOTableViewDescriptionCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TableViewDescription/JMOAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOAppDelegate.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JMOAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /TableViewDescription/JMOViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOViewController.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOViewControllerWithTableViewDescription.h" 11 | 12 | @interface JMOViewController : JMOViewControllerWithTableViewDescription 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /TableViewDescription/TableViewDescription-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /TableViewDescription/JMODemoTableViewDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMODemoTableViewDescription.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescription.h" 10 | 11 | @interface JMODemoTableViewDescription : JMOTableViewDescription 12 | 13 | + (JMODemoTableViewDescription *)descriptionNumber:(NSInteger)number; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /TableViewDescription/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "JMOAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([JMOAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionCell.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOTableViewDescriptionCellUpdate.h" 11 | 12 | @interface JMOTableViewDescriptionCell : UITableViewCell 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewSectionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewSectionView.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewSectionView.h" 10 | 11 | @implementation JMOTableViewSectionView 12 | 13 | - (void)setBackgroundColor:(UIColor *)backgroundColor 14 | { 15 | NSLog(@""); 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewSectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewSectionView.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOTableViewDescriptionSectionUpdate.h" 11 | 12 | @interface JMOTableViewSectionView : UITableViewHeaderFooterView 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.xcworkspace/xcuserdata/jeromemorissard.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TableViewDescription/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionUI.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewDescriptionUI.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #ifndef TableViewDescription_TableViewDescriptionUI_h 10 | #define TableViewDescription_TableViewDescriptionUI_h 11 | 12 | #import "UITableView+TableViewDescription.h" 13 | #import "JMOTableViewDescriptionCell.h" 14 | #import "JMOTableViewSectionView.h" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionControllers.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionControllers.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #ifndef TableViewDescription_TableViewDescriptionControllers_h 10 | #define TableViewDescription_TableViewDescriptionControllers_h 11 | 12 | #import "JMOViewControllerWithTableViewDescription.h" 13 | #import "JMOTableViewDescriptionController.h" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionModels.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionModels.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #ifndef TableViewDescription_JMOTableViewDescriptionModels_h 10 | #define TableViewDescription_JMOTableViewDescriptionModels_h 11 | 12 | #import "JMOTableViewDescription.h" 13 | #import "JMOTableViewSectionDescription.h" 14 | #import "JMOTableViewRowDescription.h" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewNibCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewNibCell.m 3 | // TableViewDescription 4 | // 5 | // Created by jerome morissard on 16/10/2016. 6 | // Copyright © 2016 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewNibCell.h" 10 | 11 | @implementation JMOTableViewNibCell 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/UITableView+TableViewDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+TableViewDescription.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class JMOTableViewDescription; 12 | @interface UITableView (TableViewDescription) 13 | 14 | - (void)reloadDataFromDescription:(JMOTableViewDescription *)fromDescription toDescription:(JMOTableViewDescription *)toDescription animated:(BOOL)animated; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /TableViewDescription/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionCellUpdate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionCellUpdate.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class JMOTableViewRowDescription; 12 | @protocol JMOTableViewDescriptionCellUpdate 13 | 14 | @optional 15 | - (void)updateCellWithData:(_Nullable id)data; 16 | - (void)updateCellWithDescription:(nonnull JMOTableViewRowDescription *)description; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionSectionUpdate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionSectionUpdate.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class JMOTableViewSectionDescription; 12 | @protocol JMOTableViewDescriptionSectionUpdate 13 | 14 | @optional 15 | - (void)updateSectionWithData:(_Nullable id)data; 16 | - (void)updateSectionWithDescription:(nonnull JMOTableViewSectionDescription *)description; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionController.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOTableViewDescriptionDelegate.h" 11 | 12 | @class JMOTableViewDescription; 13 | 14 | @interface JMOTableViewDescriptionController : UITableViewController 15 | 16 | @property (strong, nonatomic, nullable) JMOTableViewDescription *tableViewDescription; 17 | 18 | - (void)setTableViewDescription:(nullable JMOTableViewDescription *)tableViewDescription animated:(BOOL)animated; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/xcuserdata/J.COUDSI.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TableViewDescription.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C29D1A8B18DAC0A80011C2E7 16 | 17 | primary 18 | 19 | 20 | C29D1AAC18DAC0A80011C2E7 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOViewControllerWithTableViewDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOViewControllerWithTableViewDescription.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOTableViewDescriptionDelegate.h" 11 | 12 | @class JMOTableViewDescription; 13 | 14 | @interface JMOViewControllerWithTableViewDescription : UIViewController 15 | 16 | @property (nullable, strong, nonatomic) JMOTableViewDescription *tableViewDescription; 17 | 18 | - (void)setTableViewDescription:(nullable JMOTableViewDescription *)tableViewDescription animated:(BOOL)animated; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/xcuserdata/jeromemorissard.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TableViewDescription.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C29D1A8B18DAC0A80011C2E7 16 | 17 | primary 18 | 19 | 20 | C29D1AAC18DAC0A80011C2E7 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionDelegate.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class JMOTableViewRowDescription; 12 | @class JMOTableViewSectionDescription; 13 | @protocol JMOTableViewDescriptionDelegate 14 | 15 | @optional 16 | - (void)tableView:(nonnull UITableView *)tableView didSelectRowAtIndexPath:(nonnull NSIndexPath *)indexPath rowDescription:(nonnull JMOTableViewRowDescription *)rowDescription; 17 | - (void)tableView:(nonnull UITableView *)tableView didSelectSectionAtIndex:(NSInteger)index sectionDescription:(nonnull JMOTableViewSectionDescription *)sectionDescription; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /TableViewDescriptionTests/TableViewDescriptionTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jmo.tableviewdescription.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewCellRed.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewCellRed.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewCellRed.h" 10 | 11 | @implementation JMOTableViewCellRed 12 | 13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | // Initialization code 18 | [self.textLabel setTextColor:[UIColor redColor]]; 19 | [self.textLabel setBackgroundColor:[UIColor clearColor]]; 20 | [self.contentView setBackgroundColor:[[UIColor redColor] colorWithAlphaComponent:0.15]]; 21 | [self setBackgroundColor:[[UIColor redColor] colorWithAlphaComponent:0.15]]; 22 | } 23 | return self; 24 | } 25 | 26 | #pragma mark - JMOTableViewDescriptionCellUpdate 27 | 28 | - (void)updateCellWithDescriptionData:(id)data 29 | { 30 | self.textLabel.text = data; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewCellBlue.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewCellBlue.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewCellBlue.h" 10 | 11 | @implementation JMOTableViewCellBlue 12 | 13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | // Initialization code 18 | [self.textLabel setTextColor:[UIColor blueColor]]; 19 | [self.textLabel setBackgroundColor:[UIColor clearColor]]; 20 | [self.contentView setBackgroundColor:[[UIColor blueColor] colorWithAlphaComponent:0.15]]; 21 | [self setBackgroundColor:[[UIColor blueColor] colorWithAlphaComponent:0.15]]; 22 | } 23 | return self; 24 | } 25 | 26 | #pragma mark - JMOTableViewDescriptionCellUpdate 27 | 28 | - (void)updateCellWithDescriptionData:(id)data 29 | { 30 | self.textLabel.text = data; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewCellGreen.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewCellGreen.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewCellGreen.h" 10 | 11 | @implementation JMOTableViewCellGreen 12 | 13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | // Initialization code 18 | [self.textLabel setTextColor:[UIColor greenColor]]; 19 | [self.textLabel setBackgroundColor:[UIColor clearColor]]; 20 | [self.contentView setBackgroundColor:[[UIColor greenColor] colorWithAlphaComponent:0.15]]; 21 | [self setBackgroundColor:[[UIColor greenColor] colorWithAlphaComponent:0.15]]; 22 | 23 | } 24 | return self; 25 | } 26 | 27 | #pragma mark - JMOTableViewDescriptionCellUpdate 28 | 29 | - (void)updateCellWithDescriptionData:(id)data 30 | { 31 | self.textLabel.text = data; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionHeaders.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionHeaders.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | 10 | // Log using the same parameters above but include the function name and source code line number in the log statement 11 | #ifdef DEBUG 12 | #define JMOLog(fmt, ...) NSLog((@"Func: %s, Line: %d, " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 13 | #else 14 | #define JMOLog(...) 15 | #endif 16 | 17 | #ifndef TableViewDescription_JMOTableViewDescriptionHeaders_h 18 | #define TableViewDescription_JMOTableViewDescriptionHeaders_h 19 | 20 | //Controllers 21 | #import "JMOTableViewDescriptionController.h" //TableViewController 22 | #import "JMOViewControllerWithTableViewDescription.h" //UIViewController 23 | 24 | //Models 25 | #import "JMOTableViewDescriptionModels.h" 26 | 27 | //Protocols 28 | #import "JMOTableViewDescriptionCellUpdate.h" 29 | #import "JMOTableViewDescriptionSectionUpdate.h" 30 | #import "JMOTableViewDescriptionDelegate.h" 31 | 32 | //UI 33 | #import "JMOTableViewDescriptionUI.h" 34 | 35 | #endif -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | // 2 | // The MIT License (MIT) 3 | // 4 | // Copyright (c) 2014 Morissard 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /TableViewDescription/JMOSectionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOSectionView.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOSectionView.h" 10 | 11 | @interface JMOSectionView () 12 | @property (weak, nonatomic) UILabel *label; 13 | @end 14 | 15 | @implementation JMOSectionView 16 | 17 | - (id)initWithFrame:(CGRect)frame 18 | { 19 | self = [super initWithFrame:frame]; 20 | if (self) { 21 | // Initialization code 22 | UILabel *sectionLabel = [[UILabel alloc] initWithFrame:frame]; 23 | [sectionLabel setBackgroundColor:[UIColor clearColor]]; 24 | sectionLabel.textAlignment = NSTextAlignmentCenter; 25 | sectionLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 26 | [self.contentView addSubview:sectionLabel]; 27 | [self setBackgroundColor:[UIColor whiteColor]]; 28 | self.label = sectionLabel; 29 | } 30 | return self; 31 | } 32 | 33 | #pragma mark - JMOTableViewDescriptionSectionUpdate 34 | 35 | - (void)updateSectionWithDescriptionData:(id)data 36 | { 37 | self.label.text = data; 38 | } 39 | 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewRowDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewRowDescription.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JMOTableViewRowDescription : NSObject 12 | 13 | @property (strong, nonatomic, nullable) Class cellClass; 14 | @property (strong, nonatomic, nullable) NSString *cellReuseIdentifier; 15 | @property (strong, nonatomic, nullable) id data; 16 | @property (assign, nonatomic) CGFloat cellHeight; 17 | @property (strong, nonatomic, nullable) UINib *nib; 18 | 19 | + (nonnull instancetype)rowDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 20 | nibName:(nonnull NSString *)cellNibName 21 | cellHeight:(CGFloat)cellHeight; 22 | 23 | + (nonnull instancetype)rowDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 24 | cellClass:(_Nonnull Class)cellClass 25 | cellHeight:(CGFloat)cellHeight; 26 | 27 | + (nonnull instancetype)rowDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 28 | nib:(nonnull UINib *)nib 29 | cellHeight:(CGFloat)cellHeight; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /TableViewDescription/TableViewDescription-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.jmo.tableviewdescription.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 0.2.4 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 0.2.4 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | Launch Screen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewNibCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /JMOTableViewDescription.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "JMOTableViewDescription" 4 | s.version = "0.3.0" 5 | s.summary = "JMOTableViewDescription is an iOS library for easily manage complex tableView." 6 | s.requires_arc = true 7 | 8 | s.description = <<-DESC 9 | JMOTableViewDescription is an Objective-C library for easily creating and manage complex structured tableView. 10 | * A new way to describe your tableView "layout" in a very simple method, 11 | * Datasource / Delegate considerably simplified and focus on manipulated objet, no indexPath! 12 | * It's a very simple way to produce a "grouped tableView" style without having to use the "F*******g" TableView grouped! 13 | * The code produced using this implementation his highly customizable, reusable and flexible. (No more bugs?) 14 | DESC 15 | 16 | s.homepage = "https://github.com/leverdeterre/JMOTableViewDescription" 17 | s.screenshots = "https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/master/screenshots/screenshot1.png", 18 | "https://raw.githubusercontent.com/leverdeterre/JMOTableViewDescription/master/screenshots/screenshot2.png" 19 | 20 | s.license = 'MIT' 21 | s.author = { "jerome Morissard" => "morissardj@gmail.com" } 22 | s.platform = :ios, '6.0' 23 | s.source = { :git => "https://github.com/leverdeterre/JMOTableViewDescription.git", :tag => "0.3.0" } 24 | s.source_files = 'Classes', 'TableViewDescription/JMOTableViewDescription/*.{h,m}' 25 | s.framework = 'UIKit' 26 | end 27 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.xcworkspace/xcshareddata/TableViewDescription.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 58F09CDA-E540-4917-B95E-65A9A1A7EC3B 9 | IDESourceControlProjectName 10 | TableViewDescription 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 79FC48F5-B7C8-402E-800D-FC4642B2C81E 14 | https://github.com/leverdeterre/TableViewDescription.git 15 | 16 | IDESourceControlProjectPath 17 | TableViewDescription.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 79FC48F5-B7C8-402E-800D-FC4642B2C81E 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/leverdeterre/TableViewDescription.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 79FC48F5-B7C8-402E-800D-FC4642B2C81E 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 79FC48F5-B7C8-402E-800D-FC4642B2C81E 36 | IDESourceControlWCCName 37 | TableViewDescription 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewSectionDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewSectionDescription.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOTableViewRowDescription.h" 11 | 12 | @interface JMOTableViewSectionDescription : NSObject 13 | 14 | @property (strong, nonatomic, nullable) Class sectionClass; 15 | @property (strong, nonatomic, nullable) UINib *nib; 16 | @property (strong, nonatomic, nullable) NSString *sectionReuseIdentifier; 17 | @property (assign, nonatomic) CGFloat sectionHeight; 18 | @property (strong, nonatomic, nullable) id data; 19 | @property (strong, nonatomic, readonly, nullable) NSMutableArray *rowDescriptions; 20 | 21 | - (void)addRowDescription:(nonnull JMOTableViewRowDescription *)rowDesc; 22 | 23 | + (nonnull instancetype)sectionDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 24 | nibName:(nonnull NSString *)sectionNibName 25 | sectionHeight:(CGFloat)sectionHeight; 26 | 27 | + (nonnull instancetype)sectionDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 28 | cellClass:(_Nonnull Class)sectionClass 29 | sectionHeight:(CGFloat)sectionHeight; 30 | 31 | + (nonnull instancetype)sectionDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 32 | nib:(nonnull UINib *)nib 33 | sectionHeight:(CGFloat)sectionHeight; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.xcworkspace/xcshareddata/TableViewDescription.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "2E7F9BAA6D0CD54A92D636C5C1BDD3DC591A9C06", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "2DB8CCABDE7A93E3308B640CAAEDE3900BB85093" : 9223372036854775807, 8 | "2E7F9BAA6D0CD54A92D636C5C1BDD3DC591A9C06" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "58F09CDA-E540-4917-B95E-65A9A1A7EC3B", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "2DB8CCABDE7A93E3308B640CAAEDE3900BB85093" : "", 13 | "2E7F9BAA6D0CD54A92D636C5C1BDD3DC591A9C06" : "JMOTableViewDescription\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "TableViewDescription", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "TableViewDescription.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/leverdeterre\/xctool-log2junit.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2DB8CCABDE7A93E3308B640CAAEDE3900BB85093" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/leverdeterre\/JMOTableViewDescription.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2E7F9BAA6D0CD54A92D636C5C1BDD3DC591A9C06" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescription.h 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // Version 0.1 8 | 9 | #import 10 | 11 | #import "JMOTableViewSectionDescription.h" 12 | #import "JMOTableViewRowDescription.h" 13 | #import "UITableView+TableViewDescription.h" 14 | 15 | @interface JMOTableViewDescription : NSObject 16 | 17 | @property (strong, nonatomic, nullable) NSMutableArray *sectionDescriptions; 18 | 19 | - (void)addSectionDescription:(nonnull JMOTableViewSectionDescription *)sectionDesc; 20 | 21 | - (void)registerClassesInTableView:(nonnull UITableView *)tableView; 22 | 23 | - (nullable JMOTableViewSectionDescription *)sectionDescriptionForSection:(NSInteger)section; 24 | - (nullable JMOTableViewRowDescription *)rowDescriptionForIndexPath:(nonnull NSIndexPath *)indexPath; 25 | 26 | - (void)moveRowAtIndexPath:(nonnull NSIndexPath *)indexPath toIndexPath:(nonnull NSIndexPath *)newIndexPath; 27 | - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection; 28 | 29 | /* 30 | - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation; 31 | - (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation; 32 | - (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation NS_AVAILABLE_IOS(3_0); 33 | - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection NS_AVAILABLE_IOS(5_0); 34 | 35 | - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation; 36 | - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation; 37 | - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation NS_AVAILABLE_IOS(3_0); 38 | - (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath NS_AVAILABLE_IOS(5_0); 39 | */ 40 | 41 | @property (assign, nonatomic, readonly) CGFloat cumulatedHeights; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /TableViewDescription/JMOAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOAppDelegate.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOAppDelegate.h" 10 | 11 | @implementation JMOAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewRowDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewRowDescription.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewRowDescription.h" 10 | 11 | @implementation JMOTableViewRowDescription 12 | 13 | + (nonnull instancetype)rowDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 14 | nibName:(nonnull NSString *)cellNibName 15 | cellHeight:(CGFloat)cellHeight 16 | { 17 | JMOTableViewRowDescription *desc = [[self.class alloc] init]; 18 | desc.cellReuseIdentifier = reuseIdentifier; 19 | UINib *nib = [UINib nibWithNibName:cellNibName bundle:[NSBundle mainBundle]]; 20 | NSAssert(nib != nil, @"Nib instanciation failed ? Nib not in mainBundle ?"); 21 | desc.nib = nib; 22 | desc.cellHeight = cellHeight; 23 | return desc; 24 | } 25 | 26 | + (nonnull instancetype)rowDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 27 | cellClass:(_Nonnull Class)cellClass 28 | cellHeight:(CGFloat)cellHeight 29 | { 30 | JMOTableViewRowDescription *desc = [[self.class alloc] init]; 31 | desc.cellReuseIdentifier = reuseIdentifier; 32 | desc.cellClass = cellClass; 33 | desc.cellHeight = cellHeight; 34 | return desc; 35 | } 36 | 37 | + (nonnull instancetype)rowDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 38 | nib:(nonnull UINib *)nib 39 | cellHeight:(CGFloat)cellHeight 40 | { 41 | JMOTableViewRowDescription *desc = [[self.class alloc] init]; 42 | desc.cellReuseIdentifier = reuseIdentifier; 43 | desc.nib = nib; 44 | desc.cellHeight = cellHeight; 45 | return desc; 46 | } 47 | 48 | - (NSString *)description 49 | { 50 | NSMutableString *mutaString = [NSMutableString new]; 51 | [mutaString appendFormat:@"\n\tclass:%@",self.cellClass]; 52 | [mutaString appendFormat:@"\n\tcellReuseIdentifier:%@",self.cellReuseIdentifier]; 53 | [mutaString appendFormat:@"\n\tnib:%@",self.nib]; 54 | return mutaString; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /TableViewDescription/JMOViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOViewController.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOViewController.h" 10 | #import "JMOTableViewDescriptionHeaders.h" 11 | 12 | #import "JMODemoTableViewDescription.h" 13 | #import "JMOTableViewCellRed.h" 14 | #import "JMOTableViewCellBlue.h" 15 | #import "JMOTableViewCellGreen.h" 16 | 17 | @interface JMOViewController () 18 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 19 | @property (weak, nonatomic) IBOutlet UISwitch *toggle; 20 | @property (assign, nonatomic) NSInteger num; 21 | @end 22 | 23 | @implementation JMOViewController 24 | 25 | - (void)viewDidLoad 26 | { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view, typically from a nib. 29 | 30 | self.num = 0; 31 | [self changeDataToConfigNumber:self.num]; 32 | } 33 | 34 | #pragma mark - IBActions 35 | 36 | - (IBAction)changeDataPressed:(id)sender 37 | { 38 | self.num++; 39 | if (self.num > 4) { 40 | self.num = 0; 41 | } 42 | [self changeDataToConfigNumber:self.num]; 43 | } 44 | 45 | - (void)changeDataToConfigNumber:(NSInteger)num 46 | { 47 | JMODemoTableViewDescription *config = [JMODemoTableViewDescription descriptionNumber:num]; 48 | if (self.toggle.isOn) { 49 | [self setTableViewDescription:config]; 50 | } else { 51 | [self setTableViewDescription:config animated:NO]; 52 | } 53 | } 54 | 55 | #pragma mark - JMOTableViewDescriptionViewController 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 58 | { 59 | UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath]; 60 | 61 | //You can manage your own custom update 62 | if (cell.class == UITableViewCell.class) { 63 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 64 | cell.textLabel.text = rowDesc.data; 65 | } 66 | return cell; 67 | } 68 | 69 | #pragma mark - JMOTableViewDescriptionDelegate 70 | 71 | - (void)tableView:(UITableView *)tableView didSelectDataDescription:(id)selectedData 72 | { 73 | JMOLog(@"Do something with selectedData : %@",selectedData); 74 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"TableViewDescriptionDelegate" message:@"Do something with selected Data" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil]; 75 | [alert show]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewSectionDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewSectionDescription.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewSectionDescription.h" 10 | 11 | @implementation JMOTableViewSectionDescription 12 | 13 | - (id)init 14 | { 15 | self = [super init]; 16 | if (self) { 17 | _rowDescriptions = [NSMutableArray new]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)addRowDescription:(JMOTableViewRowDescription *)rowDesc 23 | { 24 | [_rowDescriptions addObject:rowDesc]; 25 | } 26 | 27 | + (nonnull instancetype)sectionDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 28 | nibName:(nonnull NSString *)sectionNibName 29 | sectionHeight:(CGFloat)sectionHeight 30 | { 31 | JMOTableViewSectionDescription *desc = [[self.class alloc] init]; 32 | desc.sectionReuseIdentifier = reuseIdentifier; 33 | desc.sectionHeight = sectionHeight; 34 | desc.nib = [UINib nibWithNibName:sectionNibName bundle:[NSBundle mainBundle]]; 35 | return desc; 36 | } 37 | 38 | + (nonnull instancetype)sectionDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 39 | cellClass:(_Nonnull Class)sectionClass 40 | sectionHeight:(CGFloat)sectionHeight 41 | { 42 | JMOTableViewSectionDescription *desc = [[self.class alloc] init]; 43 | desc.sectionReuseIdentifier = reuseIdentifier; 44 | desc.sectionClass = sectionClass; 45 | desc.sectionHeight = sectionHeight; 46 | return desc; 47 | } 48 | 49 | + (nonnull instancetype)sectionDescriptionWithReuseIdentifier:(nonnull NSString *)reuseIdentifier 50 | nib:(nonnull UINib *)nib 51 | sectionHeight:(CGFloat)sectionHeight 52 | { 53 | JMOTableViewSectionDescription *desc = [[self.class alloc] init]; 54 | desc.sectionReuseIdentifier = reuseIdentifier; 55 | desc.nib = nib; 56 | desc.sectionHeight = sectionHeight; 57 | return desc; 58 | } 59 | 60 | - (NSString *)description 61 | { 62 | NSMutableString *mutaString = [NSMutableString new]; 63 | [mutaString appendFormat:@"\nclass:%@",self.sectionClass]; 64 | 65 | for (int i = 0; i < self.rowDescriptions.count; i++) { 66 | [mutaString appendFormat:@"%@",self.rowDescriptions[i]]; 67 | } 68 | 69 | return mutaString; 70 | } 71 | 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## My other works 2 | 3 | [http://leverdeterre.github.io] (http://leverdeterre.github.io) 4 | 5 | 6 | # Purpose 7 | 8 | JMOTableViewDescription is an Objective-C library for easily creating and manage complex structured tableView. 9 | 10 | ![Image](screenshots/concept.png) 11 | 12 | Why this project? 13 | * TableView protocols are simple but not adapted to manipulate heterogenous objets or cells in your TableView. 14 | * Some situations can lead to very complicated algorithms to construct the right TableViewCell to present a particular object. 15 | 16 | This project present: 17 | * A new way to describe your tableView "layout" with a very simple method (a model), 18 | * Datasource / Delegate considerably simplified by using this model, 19 | * It's a very simple way to produce a "grouped tableView" style without having to use grouped stype! 20 | * The code produced using this implementation his highly customizable, reusable and flexible. (No more bugs?) 21 | * TableView delegate and datasource focus on manipulated objet, no indexPath!, 22 | * HeaderView reuse ? Replace your header by a cell, your first row :) 23 | 24 | # Supported iOS & SDK Versions 25 | 26 | * Supported build target - iOS 8 (Xcode 6 beta) 27 | * Earliest supported deployment target - iOS 6.0 28 | * Earliest compatible deployment target - iOS 6.0 29 | 30 | NOTE: 'Supported' means that the library has been tested with this version. 'Compatible' means that the library should work on this iOS version (i.e. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly. 31 | 32 | 33 | ## Versions 34 | 35 | ###### 0.1, Initial release 36 | ###### 0.2 37 | * Add methods to automaticly register cells and header/footer views. 38 | * Add ViewControllers with generic implementations of UITableViewDatasource/delegate 39 | (JMOViewControllerWithTableViewDescription, JMOTableViewControllerWithTableViewDescription). 40 | * Add protocols to update Cells, Footers, Headers with data stored into the element description 41 | ( updateCellWithDescriptionData:(id)data && updateSectionWithDescriptionData:(id)data ). 42 | * Add new protocol : JMOTableViewDescriptionDelegate, to be focus on data not on indexPath. 43 | 44 | # How to use it ? 45 | * Implement your own JMODemoTableViewDescription, 46 | ```objc 47 | JMODemoTableViewDescription *desc = [JMODemoTableViewDescription new]; 48 | JMOTableViewSectionDescription *oneSection = [JMOTableViewSectionDescription new]; 49 | 50 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 51 | oneRow.cellClass = [UITableViewCell class]; 52 | oneRow.cellHeight = 30.0f; 53 | oneRow.cellReuseIdentifier = @"UITableViewCellIdentifier"; 54 | oneRow.data = @"My Fake 1st section (it's a cell!)"; 55 | [oneSection addRowDescription:oneRow]; 56 | ... 57 | return desc; 58 | ``` 59 | 60 | * Implement your generic cell/section update 61 | ```objc 62 | @protocol JMOTableViewDescriptionCellUpdate 63 | 64 | @optional 65 | - (void)updateCellWithData:(id)data; 66 | - (void)updateCellWithRowDescription:(id)data; 67 | 68 | @end 69 | ``` 70 | 71 | * Implement your own cell update to manage special case 72 | ```objc 73 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 74 | { 75 | UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath]; 76 | 77 | //You can manage your own custom update 78 | if (cell.class == UITableViewCell.class) { 79 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 80 | cell.textLabel.text = rowDesc.data; 81 | } 82 | return cell; 83 | } 84 | ``` 85 | 86 | * Implement JMOTableViewDescriptionDelegate to be focus on Data 87 | ```objc 88 | - (void)tableView:(UITableView *)tableView didSelectDataDescription:(id)selectedData 89 | { 90 | JMOLog(@"Do something with selectedData : %@",selectedData); 91 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"TableViewDescriptionDelegate" message:@"Do something with selected Data" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil]; 92 | [alert show]; 93 | } 94 | ``` 95 | 96 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/xcuserdata/J.COUDSI.xcuserdatad/xcschemes/TableViewDescription.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/xcuserdata/jeromemorissard.xcuserdatad/xcschemes/TableViewDescription.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Launch Screen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /TableViewDescription/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 32 | 33 | 34 | 35 | 36 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/UITableView+TableViewDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+TableViewDescription.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/28/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "UITableView+TableViewDescription.h" 10 | #import "JMOTableViewDescription.h" 11 | 12 | @implementation UITableView (TableViewDescription) 13 | 14 | - (void)reloadDataFromDescription:(JMOTableViewDescription *)fromDescription toDescription:(JMOTableViewDescription *)toDescription animated:(BOOL)animated 15 | { 16 | if (animated == NO) { 17 | [self reloadData]; 18 | return; 19 | } 20 | 21 | NSArray *fromSectionDescriptions = fromDescription.sectionDescriptions; 22 | NSArray *toSectionDescriptions = toDescription.sectionDescriptions; 23 | 24 | if (fromSectionDescriptions == nil || fromSectionDescriptions.count == 0) { 25 | [self reloadData]; 26 | return; 27 | } 28 | 29 | [self beginUpdates]; 30 | NSMutableArray *insertedSection = [NSMutableArray new]; 31 | 32 | //Update sections 33 | if (fromSectionDescriptions.count > toSectionDescriptions.count) { 34 | NSMutableIndexSet *indexSetToRemove = [NSMutableIndexSet new]; 35 | for (int i = 0; i < (fromSectionDescriptions.count - toSectionDescriptions.count) ; i++) { 36 | [indexSetToRemove addIndex:(fromSectionDescriptions.count -i -1)]; 37 | NSLog(@"deleteSection %@",@(fromSectionDescriptions.count -i -1)); 38 | 39 | } 40 | [self deleteSections:indexSetToRemove withRowAnimation:UITableViewRowAnimationFade]; 41 | } 42 | else if (fromSectionDescriptions.count < toSectionDescriptions.count) { 43 | NSMutableIndexSet *indexSetToadd = [NSMutableIndexSet new]; 44 | for (int i = 0; i < ( toSectionDescriptions.count - fromSectionDescriptions.count) ; i++) { 45 | [indexSetToadd addIndex:(fromSectionDescriptions.count + i)]; 46 | [insertedSection addObject:@(fromSectionDescriptions.count + i)]; 47 | NSLog(@"insertSections %@",@(fromSectionDescriptions.count + i)); 48 | } 49 | [self insertSections:indexSetToadd withRowAnimation:UITableViewRowAnimationFade]; 50 | } 51 | else { 52 | //No changes of number of section 53 | NSLog(@"No changes of number of section"); 54 | } 55 | 56 | //Update rows 57 | for (int i = 0; i < toSectionDescriptions.count; i++) { 58 | NSInteger previousRows = 0; 59 | NSInteger currentRows = 0; 60 | NSMutableArray *indexPathtsToRemove = [NSMutableArray new]; 61 | NSMutableArray *indexPathtsToAdd = [NSMutableArray new]; 62 | 63 | 64 | if (fromSectionDescriptions.count > i) { 65 | previousRows = (NSInteger)[[(JMOTableViewSectionDescription *)fromSectionDescriptions[i] rowDescriptions] count]; 66 | } 67 | currentRows = (NSInteger)[[(JMOTableViewSectionDescription *)toSectionDescriptions[i] rowDescriptions] count]; 68 | if (previousRows < currentRows) { 69 | for (int j = 0; j < (currentRows - previousRows) ; j++) { 70 | [indexPathtsToAdd addObject:[NSIndexPath indexPathForRow:j inSection:i]]; 71 | } 72 | } 73 | else if (currentRows < previousRows) { 74 | for (int j = 0; j < (previousRows - currentRows) ; j++) { 75 | [indexPathtsToRemove addObject:[NSIndexPath indexPathForRow:j inSection:i]]; 76 | } 77 | } 78 | 79 | // 80 | if (indexPathtsToRemove.count > 0) { 81 | NSLog(@"deleteRowsAtIndexPaths %@",indexPathtsToRemove); 82 | [self deleteRowsAtIndexPaths:indexPathtsToRemove withRowAnimation:UITableViewRowAnimationFade]; 83 | } 84 | if (indexPathtsToAdd.count > 0) { 85 | NSLog(@"insertRowsAtIndexPaths %@",indexPathtsToAdd); 86 | [self insertRowsAtIndexPaths:indexPathtsToAdd withRowAnimation:UITableViewRowAnimationFade]; 87 | } 88 | } 89 | 90 | //insertedSection 91 | NSMutableArray *indexPathtsToAdd = [NSMutableArray new]; 92 | if (insertedSection.count > 0) { 93 | for (int i = 0; i < insertedSection.count; i++) { 94 | NSNumber *insertedSections = insertedSection[i]; 95 | NSInteger numberOfRows = [[(JMOTableViewSectionDescription *)toSectionDescriptions[[insertedSections integerValue]] rowDescriptions] count]; 96 | 97 | for (int j = 0; j < numberOfRows; j++) { 98 | [indexPathtsToAdd addObject:[NSIndexPath indexPathForRow:j inSection:[insertedSections integerValue]]]; 99 | } 100 | } 101 | 102 | NSLog(@"insertRowsAtIndexPaths %@",indexPathtsToAdd); 103 | [self insertRowsAtIndexPaths:indexPathtsToAdd withRowAnimation:UITableViewRowAnimationFade]; 104 | } 105 | 106 | [self endUpdates]; 107 | 108 | //Reload all indexPath 109 | NSMutableArray *indexPathsToReload = [NSMutableArray new]; 110 | for (int i = 0; i < toDescription.sectionDescriptions.count; i++) { 111 | JMOTableViewSectionDescription *sectionDesc = toDescription.sectionDescriptions[i]; 112 | for (int j = 0; j < sectionDesc.rowDescriptions.count; j++) { 113 | NSIndexPath *indexP = [NSIndexPath indexPathForRow:j inSection:i]; 114 | [indexPathsToReload addObject:indexP]; 115 | } 116 | } 117 | 118 | if (indexPathsToReload.count > 0) { 119 | [self reloadRowsAtIndexPaths:indexPathsToReload withRowAnimation:UITableViewRowAnimationAutomatic]; 120 | } 121 | 122 | } 123 | 124 | @end 125 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescription.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescription.h" 10 | #import "JMOTableViewSectionDescription.h" 11 | 12 | @implementation JMOTableViewDescription 13 | 14 | - (id)init 15 | { 16 | self = [super init]; 17 | if (self) { 18 | _sectionDescriptions = [NSMutableArray array]; 19 | } 20 | 21 | return self; 22 | } 23 | 24 | - (void)addSectionDescription:(JMOTableViewSectionDescription *)sectionDesc 25 | { 26 | [_sectionDescriptions addObject:sectionDesc]; 27 | } 28 | 29 | - (NSString *)description 30 | { 31 | NSMutableString *mutaString = [NSMutableString new]; 32 | 33 | for (int i = 0; i < self.sectionDescriptions.count; i++) { 34 | [mutaString appendFormat:@"%@",self.sectionDescriptions[i]]; 35 | } 36 | 37 | return mutaString; 38 | } 39 | 40 | #pragma mark - Registering Cells and Headers/footers 41 | 42 | - (void)registerClassesInTableView:(UITableView *)tableView 43 | { 44 | [self.sectionDescriptions enumerateObjectsUsingBlock:^(JMOTableViewSectionDescription *sectionDesc, NSUInteger idx, BOOL *stop) { 45 | 46 | //register sections 47 | if (sectionDesc.nib) { 48 | [self registerHeaderFooterNib:sectionDesc.nib withIdentifier:sectionDesc.sectionReuseIdentifier inTableView:tableView]; 49 | 50 | } else if (sectionDesc.sectionClass) { 51 | [self registerHeaderFooterClass:sectionDesc.sectionClass withIdentifier:sectionDesc.sectionReuseIdentifier inTableView:tableView]; 52 | } 53 | 54 | //register rows 55 | [sectionDesc.rowDescriptions enumerateObjectsUsingBlock:^(JMOTableViewRowDescription *cellDesc, NSUInteger idx, BOOL *stop) { 56 | 57 | if (cellDesc.nib) { 58 | [self registerCellNib:cellDesc.nib withIdentifier:cellDesc.cellReuseIdentifier inTableView:tableView]; 59 | 60 | } else if (cellDesc.cellClass) { 61 | [self registerCellClass:cellDesc.cellClass withIdentifier:cellDesc.cellReuseIdentifier inTableView:tableView]; 62 | } 63 | }]; 64 | }]; 65 | } 66 | 67 | 68 | - (void)registerCellNib:(UINib *)nib withIdentifier:(NSString *)cellIdentifier inTableView:(UITableView *)tableView 69 | { 70 | [tableView registerNib:nib forCellReuseIdentifier:cellIdentifier]; 71 | } 72 | 73 | - (void)registerCellClass:(Class)cellClass withIdentifier:(NSString *)cellIdentifier inTableView:(UITableView *)tableView 74 | { 75 | NSString *reuseIdentifier; 76 | if (cellIdentifier) { 77 | reuseIdentifier = cellIdentifier; 78 | } else if (cellClass) { 79 | reuseIdentifier = NSStringFromClass(cellClass); 80 | } 81 | 82 | if (cellClass && reuseIdentifier) { 83 | [tableView registerClass:cellClass forCellReuseIdentifier:reuseIdentifier]; 84 | } 85 | } 86 | 87 | - (void)registerHeaderFooterNib:(UINib *)nib withIdentifier:(NSString *)sectionIdentifier inTableView:(UITableView *)tableView 88 | { 89 | [tableView registerNib:nib forHeaderFooterViewReuseIdentifier:sectionIdentifier]; 90 | } 91 | 92 | - (void)registerHeaderFooterClass:(Class)sectionClass withIdentifier:(NSString *)sectionIdentifier inTableView:(UITableView *)tableView 93 | { 94 | NSString *reuseIdentifier; 95 | if (sectionIdentifier) { 96 | reuseIdentifier = sectionIdentifier; 97 | } else if (sectionClass) { 98 | reuseIdentifier = NSStringFromClass(sectionClass); 99 | } 100 | 101 | if (sectionClass && reuseIdentifier) { 102 | [tableView registerClass:sectionClass forHeaderFooterViewReuseIdentifier:reuseIdentifier]; 103 | } 104 | } 105 | 106 | #pragma mark - Helpers 107 | 108 | - (JMOTableViewSectionDescription *)sectionDescriptionForSection:(NSInteger)section 109 | { 110 | return self.sectionDescriptions[section]; 111 | } 112 | 113 | - (JMOTableViewRowDescription *)rowDescriptionForIndexPath:(NSIndexPath *)indexPath 114 | { 115 | JMOTableViewSectionDescription *tableSection = self.sectionDescriptions[indexPath.section]; 116 | JMOTableViewRowDescription *rowDesc = tableSection.rowDescriptions[indexPath.row]; 117 | return rowDesc; 118 | } 119 | 120 | - (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath 121 | { 122 | JMOTableViewSectionDescription *tableSection = self.sectionDescriptions[indexPath.section]; 123 | JMOTableViewRowDescription *rowDesc = tableSection.rowDescriptions[indexPath.row]; 124 | //NSLog(@"section %ld -> nbRow %ld",(long)indexPath.section, (long)tableSection.rowDescriptions.count); 125 | [tableSection.rowDescriptions removeObject:rowDesc]; 126 | //NSLog(@"section %ld -> nbRow %ld",(long)indexPath.section, (long)tableSection.rowDescriptions.count); 127 | 128 | JMOTableViewSectionDescription *nwTableSection = self.sectionDescriptions[newIndexPath.section]; 129 | if (newIndexPath.row == 0) { 130 | [nwTableSection.rowDescriptions insertObject:rowDesc atIndex:0]; 131 | } else { 132 | [nwTableSection.rowDescriptions insertObject:rowDesc atIndex:newIndexPath.row]; 133 | } 134 | 135 | //NSLog(@"section %ld -> nbRow %ld",(long)indexPath.section, (long)nwTableSection.rowDescriptions.count); 136 | } 137 | 138 | - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection 139 | { 140 | JMOTableViewSectionDescription *tableSection = self.sectionDescriptions[section]; 141 | [self.sectionDescriptions removeObject:tableSection]; 142 | if (newSection == 0) { 143 | [self.sectionDescriptions insertObject:tableSection atIndex:0]; 144 | } else { 145 | [self.sectionDescriptions insertObject:tableSection atIndex:newSection-1]; 146 | } 147 | } 148 | 149 | - (CGFloat)cumulatedHeights 150 | { 151 | __block CGFloat cumulatedHeight = 0.0f; 152 | [self.sectionDescriptions enumerateObjectsUsingBlock:^(JMOTableViewSectionDescription *sectionDescription, NSUInteger idx, BOOL * stop) { 153 | cumulatedHeight = cumulatedHeight + sectionDescription.sectionHeight; 154 | 155 | [sectionDescription.rowDescriptions enumerateObjectsUsingBlock:^(JMOTableViewRowDescription *rowDescription, NSUInteger idx, BOOL * stop) { 156 | cumulatedHeight = cumulatedHeight + rowDescription.cellHeight; 157 | }]; 158 | }]; 159 | 160 | return cumulatedHeight; 161 | } 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOTableViewDescriptionController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOTableViewDescriptionController.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOTableViewDescriptionController.h" 10 | #import "JMOTableViewDescription.h" 11 | #import "JMOTableViewDescriptionUI.h" 12 | 13 | //protocols 14 | #import "JMOTableViewDescriptionCellUpdate.h" 15 | #import "JMOTableViewDescriptionSectionUpdate.h" 16 | 17 | #import "JMOTableViewDescriptionHeaders.h" 18 | 19 | @interface JMOTableViewDescriptionController () 20 | @end 21 | 22 | @implementation JMOTableViewDescriptionController 23 | 24 | #pragma mark - Overided setters 25 | 26 | - (void)setTableViewDescription:(JMOTableViewDescription *)tableViewDescription 27 | { 28 | [self setTableViewDescription:tableViewDescription animated:YES]; 29 | } 30 | 31 | - (void)setTableViewDescription:(JMOTableViewDescription *)tableViewDescription animated:(BOOL)animated 32 | { 33 | dispatch_async(dispatch_get_main_queue(), ^{ 34 | 35 | if (_tableViewDescription.sectionDescriptions.count == 0) { 36 | _tableViewDescription = tableViewDescription; 37 | [self.tableViewDescription registerClassesInTableView:self.tableView]; 38 | [self.tableView reloadData]; 39 | 40 | } else { 41 | JMOTableViewDescription *oldDescription = _tableViewDescription; 42 | _tableViewDescription = tableViewDescription; 43 | [self.tableViewDescription registerClassesInTableView:self.tableView]; 44 | [self.tableView reloadDataFromDescription:oldDescription toDescription:_tableViewDescription animated:animated]; 45 | } 46 | }); 47 | 48 | } 49 | 50 | #pragma mark - UITableViewDataSource 51 | 52 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 53 | { 54 | return self.tableViewDescription.sectionDescriptions.count; 55 | } 56 | 57 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 58 | { 59 | JMOTableViewSectionDescription *tableSection = self.tableViewDescription.sectionDescriptions[section]; 60 | return tableSection.rowDescriptions.count; 61 | } 62 | 63 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 64 | { 65 | UITableViewCell *cellToReturn; 66 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 67 | cellToReturn = [self.tableView dequeueReusableCellWithIdentifier:rowDesc.cellReuseIdentifier]; 68 | 69 | if ([cellToReturn respondsToSelector:@selector(updateCellWithDescription:)]) { 70 | [cellToReturn updateCellWithDescription:rowDesc]; 71 | 72 | } else if ([cellToReturn respondsToSelector:@selector(updateCellWithData:)]) { 73 | [cellToReturn updateCellWithData:rowDesc.data]; 74 | 75 | } else { 76 | JMOLog(@"WARNING !! no update founds, for methods for protocol JMOTableViewDescriptionCellUpdate"); 77 | } 78 | 79 | return cellToReturn; 80 | } 81 | 82 | 83 | #pragma mark - UITableViewDelegate 84 | 85 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 86 | { 87 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 88 | return rowDesc.cellHeight; 89 | } 90 | 91 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 92 | { 93 | JMOTableViewSectionDescription *sectionDesc = [self.tableViewDescription sectionDescriptionForSection:section]; 94 | return sectionDesc.sectionHeight; 95 | } 96 | 97 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 98 | { 99 | JMOTableViewSectionDescription *sectionDesc = [self.tableViewDescription sectionDescriptionForSection:section]; 100 | UIView *sectionView; 101 | NSString *reuseIdentifier; 102 | if (sectionDesc.sectionReuseIdentifier) { 103 | reuseIdentifier = sectionDesc.sectionReuseIdentifier; 104 | } else if (sectionDesc.sectionClass) { 105 | reuseIdentifier = NSStringFromClass(sectionDesc.sectionClass); 106 | } 107 | 108 | if (reuseIdentifier) { 109 | if([self.tableView respondsToSelector:@selector(dequeueReusableHeaderFooterViewWithIdentifier:)]) { 110 | UIView *view = [self.tableView dequeueReusableHeaderFooterViewWithIdentifier:reuseIdentifier]; 111 | if ([view conformsToProtocol:@protocol(JMOTableViewDescriptionSectionUpdate)]) { 112 | sectionView = (UIView *)view; 113 | 114 | if ([sectionView respondsToSelector:@selector(updateSectionWithDescription:)]) { 115 | [sectionView updateSectionWithDescription:sectionDesc]; 116 | 117 | } else if ([sectionView respondsToSelector:@selector(updateSectionWithData:)]) { 118 | [sectionView updateSectionWithData:sectionDesc.data]; 119 | 120 | } else { 121 | JMOLog(@"WARNING !! no update founds, for methods for protocol JMOTableViewDescriptionSectionUpdate"); 122 | } 123 | 124 | } else { 125 | JMOLog(@"WARNING !! view not conform to protocol JMOTableViewDescriptionSectionUpdate"); 126 | } 127 | 128 | } 129 | } else { 130 | /* 131 | sectionView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(tableView.frame), sectionDesc.sectionHeight)]; 132 | UILabel *sectionLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(tableView.frame), sectionDesc.sectionHeight)]; 133 | [sectionLabel setBackgroundColor:[UIColor clearColor]]; 134 | sectionLabel.text = sectionDesc.sectionTitle; 135 | sectionLabel.textAlignment = NSTextAlignmentCenter; 136 | [sectionView addSubview:sectionLabel]; 137 | [sectionView setBackgroundColor:[UIColor whiteColor]]; 138 | */ 139 | } 140 | 141 | return sectionView; 142 | } 143 | 144 | #pragma mark - JMOTableViewDescriptionDelegate 145 | 146 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 147 | { 148 | if ([self respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:rowDescription:)]) { 149 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 150 | [self tableView:tableView didSelectRowAtIndexPath:indexPath rowDescription:rowDesc]; 151 | return; 152 | } else { 153 | JMOLog(@"WARNING !! no update founds, for methods for protocol JMOTableViewDescriptionDelegate"); 154 | } 155 | } 156 | 157 | @end 158 | -------------------------------------------------------------------------------- /TableViewDescription/JMOTableViewDescription/JMOViewControllerWithTableViewDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMOViewControllerWithTableViewDescription.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 6/9/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMOViewControllerWithTableViewDescription.h" 10 | #import "JMOTableViewDescription.h" 11 | #import "JMOTableViewDescriptionUI.h" 12 | 13 | //protocols 14 | #import "JMOTableViewDescriptionCellUpdate.h" 15 | #import "JMOTableViewDescriptionSectionUpdate.h" 16 | 17 | #import "JMOTableViewDescriptionHeaders.h" 18 | 19 | @interface JMOViewControllerWithTableViewDescription() 20 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 21 | @end 22 | 23 | @implementation JMOViewControllerWithTableViewDescription 24 | 25 | #pragma mark - LifeCycle 26 | 27 | - (void)viewDidLoad 28 | { 29 | [super viewDidLoad]; 30 | self.tableView.dataSource = self; 31 | self.tableView.delegate = self; 32 | } 33 | 34 | #pragma mark - Overided setters 35 | 36 | - (void)setTableViewDescription:(JMOTableViewDescription *)tableViewDescription 37 | { 38 | [self setTableViewDescription:tableViewDescription animated:YES]; 39 | } 40 | 41 | - (void)setTableViewDescription:(JMOTableViewDescription *)tableViewDescription animated:(BOOL)animated 42 | { 43 | dispatch_async(dispatch_get_main_queue(), ^{ 44 | 45 | if (_tableViewDescription.sectionDescriptions.count == 0) { 46 | _tableViewDescription = tableViewDescription; 47 | [self.tableViewDescription registerClassesInTableView:self.tableView]; 48 | [self.tableView reloadData]; 49 | 50 | } else { 51 | JMOTableViewDescription *oldDescription = _tableViewDescription; 52 | _tableViewDescription = tableViewDescription; 53 | [self.tableViewDescription registerClassesInTableView:self.tableView]; 54 | [self.tableView reloadDataFromDescription:oldDescription toDescription:_tableViewDescription animated:animated]; 55 | } 56 | }); 57 | 58 | } 59 | 60 | #pragma mark - UITableViewDataSource 61 | 62 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 63 | { 64 | return self.tableViewDescription.sectionDescriptions.count; 65 | } 66 | 67 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 68 | { 69 | JMOTableViewSectionDescription *tableSection = self.tableViewDescription.sectionDescriptions[section]; 70 | return tableSection.rowDescriptions.count; 71 | } 72 | 73 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 74 | { 75 | UITableViewCell *cellToReturn; 76 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 77 | cellToReturn = [self.tableView dequeueReusableCellWithIdentifier:rowDesc.cellReuseIdentifier]; 78 | if ([cellToReturn respondsToSelector:@selector(updateCellWithDescription:)]) { 79 | [cellToReturn updateCellWithDescription:rowDesc]; 80 | 81 | } else if ([cellToReturn respondsToSelector:@selector(updateCellWithData:)]) { 82 | [cellToReturn updateCellWithData:rowDesc.data]; 83 | 84 | } else { 85 | JMOLog(@"WARNING !! no update founds, for methods for protocol JMOTableViewDescriptionSectionUpdate"); 86 | } 87 | 88 | return cellToReturn; 89 | } 90 | 91 | 92 | #pragma mark - UITableViewDelegate 93 | 94 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 95 | { 96 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 97 | return rowDesc.cellHeight; 98 | } 99 | 100 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 101 | { 102 | JMOTableViewSectionDescription *sectionDesc = [self.tableViewDescription sectionDescriptionForSection:section]; 103 | return sectionDesc.sectionHeight; 104 | } 105 | 106 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 107 | { 108 | JMOTableViewSectionDescription *sectionDesc = [self.tableViewDescription sectionDescriptionForSection:section]; 109 | UIView *sectionView; 110 | NSString *reuseIdentifier; 111 | if (sectionDesc.sectionReuseIdentifier) { 112 | reuseIdentifier = sectionDesc.sectionReuseIdentifier; 113 | } else if (sectionDesc.sectionClass) { 114 | reuseIdentifier = NSStringFromClass(sectionDesc.sectionClass); 115 | } 116 | 117 | if (reuseIdentifier) { 118 | if([self.tableView respondsToSelector:@selector(dequeueReusableHeaderFooterViewWithIdentifier:)]) { 119 | UIView *view = [self.tableView dequeueReusableHeaderFooterViewWithIdentifier:reuseIdentifier]; 120 | if ([view conformsToProtocol:@protocol(JMOTableViewDescriptionSectionUpdate)]) { 121 | sectionView = (UIView *)view; 122 | 123 | if ([sectionView respondsToSelector:@selector(updateSectionWithDescription:)]) { 124 | [sectionView updateSectionWithDescription:sectionDesc]; 125 | 126 | } else if ([sectionView respondsToSelector:@selector(updateSectionWithData:)]) { 127 | [sectionView updateSectionWithData:sectionDesc.data]; 128 | 129 | } else { 130 | JMOLog(@"WARNING !! no update founds, for methods for protocol JMOTableViewDescriptionSectionUpdate"); 131 | } 132 | 133 | } else { 134 | JMOLog(@"WARNING !! view not conform to protocol JMOTableViewDescriptionSectionUpdate"); 135 | } 136 | 137 | } 138 | } else { 139 | /* 140 | sectionView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(tableView.frame), sectionDesc.sectionHeight)]; 141 | UILabel *sectionLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(tableView.frame), sectionDesc.sectionHeight)]; 142 | [sectionLabel setBackgroundColor:[UIColor clearColor]]; 143 | sectionLabel.text = sectionDesc.sectionTitle; 144 | sectionLabel.textAlignment = NSTextAlignmentCenter; 145 | [sectionView addSubview:sectionLabel]; 146 | [sectionView setBackgroundColor:[UIColor whiteColor]]; 147 | */ 148 | } 149 | 150 | return sectionView; 151 | } 152 | 153 | #pragma mark - JMOTableViewDescriptionDelegate 154 | 155 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 156 | { 157 | if ([self respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:rowDescription:)]) { 158 | JMOTableViewRowDescription *rowDesc = [self.tableViewDescription rowDescriptionForIndexPath:indexPath]; 159 | [self tableView:tableView didSelectRowAtIndexPath:indexPath rowDescription:rowDesc]; 160 | return; 161 | } else { 162 | JMOLog(@"WARNING !! no update founds, for methods for protocol JMOTableViewDescriptionDelegate"); 163 | } 164 | } 165 | 166 | 167 | @end 168 | -------------------------------------------------------------------------------- /TableViewDescriptionTests/TableViewDescriptionTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewDescriptionTests.m 3 | // TableViewDescriptionTests 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JMOTableViewRowDescription.h" 11 | #import "JMOTableViewDescription.h" 12 | #import "JMOTableViewNibCell.h" 13 | #import "JMOTableViewSectionDescription.h" 14 | #import "JMOSectionView.h" 15 | 16 | @interface TableViewDescriptionTests : XCTestCase 17 | 18 | @property (strong, nonatomic) UINib *nib; 19 | @property (strong, nonatomic) UINib *sectionNib; 20 | 21 | @end 22 | 23 | @implementation TableViewDescriptionTests 24 | 25 | - (void)setUp 26 | { 27 | [super setUp]; 28 | // Put setup code here. This method is called before the invocation of each test method in the class. 29 | self.nib = [UINib nibWithNibName:@"JMOTableViewNibCell" bundle:[NSBundle mainBundle]]; 30 | self.sectionNib = [UINib nibWithNibName:@"JMOSectionView" bundle:[NSBundle mainBundle]]; 31 | } 32 | 33 | - (void)tearDown 34 | { 35 | // Put teardown code here. This method is called after the invocation of each test method in the class. 36 | [super tearDown]; 37 | } 38 | 39 | - (void)testRowFactoryWithNibname 40 | { 41 | //XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 42 | JMOTableViewRowDescription *rowDesc = [JMOTableViewRowDescription 43 | rowDescriptionWithReuseIdentifier:@"identifier" 44 | nibName:@"JMOTableViewNibCell" 45 | cellHeight:40.0f]; 46 | 47 | XCTAssertEqual(rowDesc.cellReuseIdentifier, @"identifier"); 48 | XCTAssertNotNil(rowDesc.nib,@""); 49 | XCTAssertEqual(rowDesc.cellHeight, 40.0f); 50 | } 51 | 52 | - (void)testRowFactoryNib 53 | { 54 | JMOTableViewRowDescription *rowDesc = [JMOTableViewRowDescription 55 | rowDescriptionWithReuseIdentifier:@"JMOTableViewNibCell" 56 | nib:self.nib 57 | cellHeight:40.0f]; 58 | 59 | XCTAssertEqual(rowDesc.cellReuseIdentifier, @"JMOTableViewNibCell"); 60 | XCTAssertEqual(rowDesc.nib,self.nib); 61 | XCTAssertEqual(rowDesc.cellHeight, 40.0f); 62 | } 63 | 64 | 65 | - (void)testrRowFactoryClass 66 | { 67 | JMOTableViewRowDescription *rowDesc = [JMOTableViewRowDescription 68 | rowDescriptionWithReuseIdentifier:@"JMOTableViewNibCell" 69 | cellClass:JMOTableViewNibCell.class cellHeight:40.0f]; 70 | 71 | XCTAssertEqual(rowDesc.cellReuseIdentifier, @"JMOTableViewNibCell"); 72 | XCTAssertNotNil(rowDesc.cellClass,@""); 73 | XCTAssertEqual(rowDesc.cellHeight, 40.0f); 74 | } 75 | 76 | - (void)testSectionFactoryWithNibname 77 | { 78 | JMOTableViewSectionDescription *sectionDesc = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 79 | nibName:@"JMOSectionView" 80 | sectionHeight:40.0f]; 81 | XCTAssertEqual(sectionDesc.sectionReuseIdentifier, @"identifier"); 82 | XCTAssertNil(sectionDesc.sectionClass); 83 | XCTAssertNotNil(sectionDesc.nib); 84 | XCTAssertEqual(sectionDesc.sectionHeight, 40.0f); 85 | } 86 | 87 | - (void)testSectionFactoryWithNib 88 | { 89 | JMOTableViewSectionDescription *sectionDesc = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 90 | nib:self.sectionNib 91 | sectionHeight:40.0f]; 92 | XCTAssertEqual(sectionDesc.sectionReuseIdentifier, @"identifier"); 93 | XCTAssertNil(sectionDesc.sectionClass); 94 | XCTAssertEqual(sectionDesc.nib, self.sectionNib); 95 | XCTAssertEqual(sectionDesc.sectionHeight, 40.0f); 96 | } 97 | 98 | - (void)testSectionFactoryWithClass 99 | { 100 | JMOTableViewSectionDescription *sectionDesc = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 101 | cellClass:JMOSectionView.class 102 | sectionHeight:40.0f]; 103 | XCTAssertEqual(sectionDesc.sectionReuseIdentifier, @"identifier"); 104 | XCTAssertEqual(sectionDesc.sectionClass,JMOSectionView.class); 105 | XCTAssertNil(sectionDesc.nib,@""); 106 | XCTAssertEqual(sectionDesc.sectionHeight, 40.0f); 107 | } 108 | 109 | - (void)testCumulatedHeight_1_1 110 | { 111 | JMOTableViewSectionDescription *sectionDesc = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 112 | cellClass:JMOSectionView.class 113 | sectionHeight:40.0f]; 114 | JMOTableViewRowDescription *rowDesc = [JMOTableViewRowDescription 115 | rowDescriptionWithReuseIdentifier:@"JMOTableViewNibCell" 116 | cellClass:JMOTableViewNibCell.class cellHeight:40.0f]; 117 | 118 | JMOTableViewDescription *tableViewDes = [JMOTableViewDescription new]; 119 | [sectionDesc addRowDescription:rowDesc]; 120 | [tableViewDes addSectionDescription:sectionDesc]; 121 | XCTAssertEqual(tableViewDes.cumulatedHeights,80.0f); 122 | } 123 | 124 | - (void)testCumulatedHeight_2_1 125 | { 126 | JMOTableViewSectionDescription *sectionDesc = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 127 | cellClass:JMOSectionView.class 128 | sectionHeight:40.0f]; 129 | JMOTableViewRowDescription *rowDesc = [JMOTableViewRowDescription 130 | rowDescriptionWithReuseIdentifier:@"JMOTableViewNibCell" 131 | cellClass:JMOTableViewNibCell.class cellHeight:40.0f]; 132 | 133 | JMOTableViewSectionDescription *sectionDesc2 = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 134 | cellClass:JMOSectionView.class 135 | sectionHeight:40.0f]; 136 | 137 | JMOTableViewDescription *tableViewDes = [JMOTableViewDescription new]; 138 | [sectionDesc addRowDescription:rowDesc]; 139 | [tableViewDes addSectionDescription:sectionDesc]; 140 | [tableViewDes addSectionDescription:sectionDesc2]; 141 | XCTAssertEqual(tableViewDes.cumulatedHeights,120.0f); 142 | } 143 | 144 | - (void)testCumulatedHeight_1_2 145 | { 146 | JMOTableViewSectionDescription *sectionDesc = [JMOTableViewSectionDescription sectionDescriptionWithReuseIdentifier:@"identifier" 147 | cellClass:JMOSectionView.class 148 | sectionHeight:40.0f]; 149 | JMOTableViewRowDescription *rowDesc = [JMOTableViewRowDescription 150 | rowDescriptionWithReuseIdentifier:@"JMOTableViewNibCell" 151 | cellClass:JMOTableViewNibCell.class cellHeight:40.0f]; 152 | 153 | JMOTableViewRowDescription *rowDesc2 = [JMOTableViewRowDescription 154 | rowDescriptionWithReuseIdentifier:@"JMOTableViewNibCell" 155 | cellClass:JMOTableViewNibCell.class cellHeight:40.0f]; 156 | 157 | JMOTableViewDescription *tableViewDes = [JMOTableViewDescription new]; 158 | [sectionDesc addRowDescription:rowDesc]; 159 | [sectionDesc addRowDescription:rowDesc2]; 160 | [tableViewDes addSectionDescription:sectionDesc]; 161 | XCTAssertEqual(tableViewDes.cumulatedHeights,120.0f); 162 | } 163 | 164 | @end 165 | -------------------------------------------------------------------------------- /TableViewDescription/JMODemoTableViewDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // JMODemoTableViewDescription.m 3 | // TableViewDescription 4 | // 5 | // Created by Jerome Morissard on 3/20/14. 6 | // Copyright (c) 2014 Jerome Morissard. All rights reserved. 7 | // 8 | 9 | #import "JMODemoTableViewDescription.h" 10 | #import "JMOTableViewSectionDescription.h" 11 | 12 | #import "JMOTableViewCellRed.h" 13 | #import "JMOTableViewCellBlue.h" 14 | #import "JMOTableViewCellGreen.h" 15 | 16 | #import "JMOSectionView.h" 17 | 18 | @implementation JMODemoTableViewDescription 19 | 20 | 21 | + (JMODemoTableViewDescription *)descriptionNumber:(NSInteger)number 22 | { 23 | if (number == 4) { 24 | JMODemoTableViewDescription *desc = [JMODemoTableViewDescription new]; 25 | JMOTableViewSectionDescription *oneSection = [JMOTableViewSectionDescription new]; 26 | oneSection.sectionHeight = 0.0f; 27 | 28 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 29 | oneRow.cellClass = [UITableViewCell class]; 30 | oneRow.cellHeight = 30.0f; 31 | oneRow.cellReuseIdentifier = @"UITableViewCellIdentifier"; 32 | oneRow.data = @"My Fake 1st section (it's a cell!)"; 33 | [oneSection addRowDescription:oneRow]; 34 | 35 | oneRow = [JMOTableViewRowDescription new]; 36 | oneRow.cellClass = [JMOTableViewCellBlue class]; 37 | oneRow.cellHeight = 44.0f; 38 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 39 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 40 | [oneSection addRowDescription:oneRow]; 41 | 42 | oneRow = [JMOTableViewRowDescription new]; 43 | oneRow.cellClass = [JMOTableViewCellRed class]; 44 | oneRow.cellHeight = 44.0f; 45 | oneRow.cellReuseIdentifier = @"JMOTableViewCellRed"; 46 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 47 | [oneSection addRowDescription:oneRow]; 48 | 49 | JMOTableViewSectionDescription *secondSection = [JMOTableViewSectionDescription new]; 50 | oneSection.data = @""; 51 | oneSection.sectionHeight = 0.0f; 52 | 53 | oneRow = [JMOTableViewRowDescription new]; 54 | oneRow.cellClass = [UITableViewCell class]; 55 | oneRow.cellHeight = 30.0f; 56 | oneRow.cellReuseIdentifier = @"UITableViewCellIdentifier"; 57 | oneRow.data = @"My Fake 2nd section (it's a cell!)"; 58 | oneSection.sectionClass = [JMOSectionView class]; 59 | [secondSection addRowDescription:oneRow]; 60 | 61 | oneRow = [JMOTableViewRowDescription new]; 62 | oneRow.cellClass = [JMOTableViewCellGreen class]; 63 | oneRow.cellHeight = 44.0f; 64 | oneRow.cellReuseIdentifier = @"JMOTableViewCellGreen"; 65 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 66 | [secondSection addRowDescription:oneRow]; 67 | 68 | oneRow = [JMOTableViewRowDescription new]; 69 | oneRow.cellClass = [JMOTableViewCellBlue class]; 70 | oneRow.cellHeight = 44.0f; 71 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 72 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 73 | [secondSection addRowDescription:oneRow]; 74 | 75 | oneRow = [JMOTableViewRowDescription new]; 76 | oneRow.cellClass = [JMOTableViewCellRed class]; 77 | oneRow.cellHeight = 80.0f; 78 | oneRow.cellReuseIdentifier = @"JMOTableViewCellRed"; 79 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 80 | [secondSection addRowDescription:oneRow]; 81 | 82 | oneRow = [JMOTableViewRowDescription new]; 83 | oneRow.cellClass = [JMOTableViewCellGreen class]; 84 | oneRow.cellHeight = 70.0f; 85 | oneRow.cellReuseIdentifier = @"JMOTableViewCellGreen"; 86 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 87 | [secondSection addRowDescription:oneRow]; 88 | 89 | [desc addSectionDescription:oneSection]; 90 | [desc addSectionDescription:secondSection]; 91 | return desc; 92 | } 93 | 94 | 95 | JMODemoTableViewDescription *desc = [JMODemoTableViewDescription new]; 96 | JMOTableViewSectionDescription *oneSection = [JMOTableViewSectionDescription new]; 97 | oneSection.data = @"Real, 1St section"; 98 | oneSection.sectionHeight = 30.0f; 99 | oneSection.sectionClass = [JMOSectionView class]; 100 | 101 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 102 | oneRow.cellClass = [JMOTableViewCellBlue class]; 103 | oneRow.cellHeight = 44.0f; 104 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 105 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 106 | [oneSection addRowDescription:oneRow]; 107 | 108 | oneRow = [JMOTableViewRowDescription new]; 109 | oneRow.cellClass = [JMOTableViewCellBlue class]; 110 | oneRow.cellHeight = 69.0f; 111 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 112 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 113 | [oneSection addRowDescription:oneRow]; 114 | 115 | if (number == 1) { 116 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 117 | oneRow.cellClass = [JMOTableViewCellRed class]; 118 | oneRow.cellHeight = 44.0f; 119 | oneRow.cellReuseIdentifier = @"JMOTableViewCellRed"; 120 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 121 | [oneSection addRowDescription:oneRow]; 122 | } 123 | 124 | oneRow = [JMOTableViewRowDescription new]; 125 | oneRow.cellClass = [JMOTableViewCellBlue class]; 126 | oneRow.cellHeight = 60.0f; 127 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 128 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 129 | [oneSection addRowDescription:oneRow]; 130 | 131 | if (number == 2) { 132 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 133 | oneRow.cellClass = [JMOTableViewCellGreen class]; 134 | oneRow.cellHeight = 150.0f; 135 | oneRow.cellReuseIdentifier = @"JMOTableViewCellGreen"; 136 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 137 | [oneSection addRowDescription:oneRow]; 138 | } 139 | 140 | oneRow = [JMOTableViewRowDescription new]; 141 | oneRow.cellClass = [JMOTableViewCellBlue class]; 142 | oneRow.cellHeight = 30.0f; 143 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 144 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 145 | [oneSection addRowDescription:oneRow]; 146 | 147 | if (number == 1) { 148 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 149 | oneRow.cellClass = [JMOTableViewCellRed class]; 150 | oneRow.cellHeight = 44.0f; 151 | oneRow.cellReuseIdentifier = @"JMOTableViewCellRed"; 152 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 153 | [oneSection addRowDescription:oneRow]; 154 | } 155 | 156 | if (number == 2) { 157 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 158 | oneRow.cellClass = [JMOTableViewCellGreen class]; 159 | oneRow.cellHeight = 150.0f; 160 | oneRow.cellReuseIdentifier = @"JMOTableViewCellGreen"; 161 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 162 | [oneSection addRowDescription:oneRow]; 163 | } 164 | 165 | oneRow = [JMOTableViewRowDescription new]; 166 | oneRow.cellClass = [JMOTableViewCellBlue class]; 167 | oneRow.cellHeight = 44.0f; 168 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 169 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 170 | [oneSection addRowDescription:oneRow]; 171 | 172 | oneRow = [JMOTableViewRowDescription new]; 173 | oneRow.cellClass = [JMOTableViewCellBlue class]; 174 | oneRow.cellHeight = 44.0f; 175 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 176 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 177 | [oneSection addRowDescription:oneRow]; 178 | 179 | if (number == 1) { 180 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 181 | oneRow.cellClass = [JMOTableViewCellRed class]; 182 | oneRow.cellHeight = 150.0f; 183 | oneRow.cellReuseIdentifier = @"JMOTableViewCellRed"; 184 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 185 | [oneSection addRowDescription:oneRow]; 186 | } 187 | 188 | oneRow = [JMOTableViewRowDescription new]; 189 | oneRow.cellClass = [JMOTableViewCellBlue class]; 190 | oneRow.cellHeight = 20.0f; 191 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 192 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 193 | [oneSection addRowDescription:oneRow]; 194 | 195 | oneRow = [JMOTableViewRowDescription new]; 196 | oneRow.cellClass = [JMOTableViewCellBlue class]; 197 | oneRow.cellHeight = 20.0f; 198 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 199 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 200 | [oneSection addRowDescription:oneRow]; 201 | 202 | oneRow = [JMOTableViewRowDescription new]; 203 | oneRow.cellClass = [JMOTableViewCellBlue class]; 204 | oneRow.cellHeight = 300.0f; 205 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 206 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 207 | [oneSection addRowDescription:oneRow]; 208 | 209 | [desc addSectionDescription:oneSection]; 210 | 211 | if (number == 2) { 212 | JMOTableViewSectionDescription *secondSection = [JMOTableViewSectionDescription new]; 213 | secondSection.data = @"Real, 2nd section"; 214 | secondSection.sectionHeight = 50.0f; 215 | secondSection.sectionClass = [JMOSectionView class]; 216 | 217 | JMOTableViewRowDescription *oneRow = [JMOTableViewRowDescription new]; 218 | oneRow.cellClass = [JMOTableViewCellBlue class]; 219 | oneRow.cellHeight = 20.0f; 220 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 221 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 222 | [secondSection addRowDescription:oneRow]; 223 | 224 | oneRow = [JMOTableViewRowDescription new]; 225 | oneRow.cellClass = [JMOTableViewCellBlue class]; 226 | oneRow.cellHeight = 20.0f; 227 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 228 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 229 | [secondSection addRowDescription:oneRow]; 230 | 231 | oneRow = [JMOTableViewRowDescription new]; 232 | oneRow.cellClass = [JMOTableViewCellBlue class]; 233 | oneRow.cellHeight = 20.0f; 234 | oneRow.cellReuseIdentifier = @"JMOTableViewCellBlue"; 235 | oneRow.data = [NSString stringWithFormat:@"%@ (%d)",oneRow.cellReuseIdentifier,(int)oneRow.cellHeight]; 236 | [secondSection addRowDescription:oneRow]; 237 | 238 | [desc addSectionDescription:secondSection]; 239 | } 240 | 241 | return desc; 242 | } 243 | 244 | @end 245 | -------------------------------------------------------------------------------- /TableViewDescription.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C255BDE11945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = C255BDE01945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.m */; }; 11 | C255BDF01945DE0A00EBDF76 /* JMOTableViewDescriptionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C255BDEF1945DE0A00EBDF76 /* JMOTableViewDescriptionCell.m */; }; 12 | C255BDF31945DE4E00EBDF76 /* JMOTableViewSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = C255BDF21945DE4E00EBDF76 /* JMOTableViewSectionView.m */; }; 13 | C255BDFD1945E80C00EBDF76 /* JMOSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = C255BDFC1945E80C00EBDF76 /* JMOSectionView.m */; }; 14 | C280755418E61C390068961F /* JMOTableViewCellRed.m in Sources */ = {isa = PBXBuildFile; fileRef = C280755318E61C390068961F /* JMOTableViewCellRed.m */; }; 15 | C280755718E61C760068961F /* JMOTableViewCellBlue.m in Sources */ = {isa = PBXBuildFile; fileRef = C280755618E61C760068961F /* JMOTableViewCellBlue.m */; }; 16 | C280755A18E6212F0068961F /* JMOTableViewCellGreen.m in Sources */ = {isa = PBXBuildFile; fileRef = C280755918E6212F0068961F /* JMOTableViewCellGreen.m */; }; 17 | C280756A18E7180F0068961F /* JMOTableViewDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = C280756318E7180F0068961F /* JMOTableViewDescription.m */; }; 18 | C280756B18E7180F0068961F /* JMOTableViewRowDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = C280756518E7180F0068961F /* JMOTableViewRowDescription.m */; }; 19 | C280756C18E7180F0068961F /* JMOTableViewSectionDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = C280756718E7180F0068961F /* JMOTableViewSectionDescription.m */; }; 20 | C280756D18E7180F0068961F /* UITableView+TableViewDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = C280756918E7180F0068961F /* UITableView+TableViewDescription.m */; }; 21 | C29D1A9018DAC0A80011C2E7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29D1A8F18DAC0A80011C2E7 /* Foundation.framework */; }; 22 | C29D1A9218DAC0A80011C2E7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29D1A9118DAC0A80011C2E7 /* CoreGraphics.framework */; }; 23 | C29D1A9418DAC0A80011C2E7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29D1A9318DAC0A80011C2E7 /* UIKit.framework */; }; 24 | C29D1A9A18DAC0A80011C2E7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C29D1A9818DAC0A80011C2E7 /* InfoPlist.strings */; }; 25 | C29D1A9C18DAC0A80011C2E7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C29D1A9B18DAC0A80011C2E7 /* main.m */; }; 26 | C29D1AA018DAC0A80011C2E7 /* JMOAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C29D1A9F18DAC0A80011C2E7 /* JMOAppDelegate.m */; }; 27 | C29D1AA318DAC0A80011C2E7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C29D1AA118DAC0A80011C2E7 /* Main.storyboard */; }; 28 | C29D1AA618DAC0A80011C2E7 /* JMOViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29D1AA518DAC0A80011C2E7 /* JMOViewController.m */; }; 29 | C29D1AA818DAC0A80011C2E7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C29D1AA718DAC0A80011C2E7 /* Images.xcassets */; }; 30 | C29D1AAF18DAC0A80011C2E7 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29D1AAE18DAC0A80011C2E7 /* XCTest.framework */; }; 31 | C29D1AB018DAC0A80011C2E7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29D1A8F18DAC0A80011C2E7 /* Foundation.framework */; }; 32 | C29D1AB118DAC0A80011C2E7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C29D1A9318DAC0A80011C2E7 /* UIKit.framework */; }; 33 | C29D1AB918DAC0A80011C2E7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C29D1AB718DAC0A80011C2E7 /* InfoPlist.strings */; }; 34 | C29D1ABB18DAC0A80011C2E7 /* TableViewDescriptionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C29D1ABA18DAC0A80011C2E7 /* TableViewDescriptionTests.m */; }; 35 | C29D1AD018DAC3010011C2E7 /* JMODemoTableViewDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = C29D1ACF18DAC3010011C2E7 /* JMODemoTableViewDescription.m */; }; 36 | C2A667871DB3A49F00676825 /* JMOTableViewNibCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C2A667861DB3A49F00676825 /* JMOTableViewNibCell.m */; }; 37 | C2A667891DB3A4B200676825 /* JMOTableViewNibCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C2A667881DB3A4B200676825 /* JMOTableViewNibCell.xib */; }; 38 | C2A6678B1DB3AF3900676825 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2A6678A1DB3AF3900676825 /* Launch Screen.storyboard */; }; 39 | C2A6678D1DB3AFC800676825 /* JMOTableViewDescription.podspec in Resources */ = {isa = PBXBuildFile; fileRef = C2A6678C1DB3AFC800676825 /* JMOTableViewDescription.podspec */; }; 40 | C2EB6C561A92029400A6DE03 /* JMOTableViewDescriptionController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2EB6C551A92029400A6DE03 /* JMOTableViewDescriptionController.m */; }; 41 | /* End PBXBuildFile section */ 42 | 43 | /* Begin PBXContainerItemProxy section */ 44 | C29D1AB218DAC0A80011C2E7 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = C29D1A8418DAC0A80011C2E7 /* Project object */; 47 | proxyType = 1; 48 | remoteGlobalIDString = C29D1A8B18DAC0A80011C2E7; 49 | remoteInfo = TableViewDescription; 50 | }; 51 | /* End PBXContainerItemProxy section */ 52 | 53 | /* Begin PBXFileReference section */ 54 | C255BDDF1945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOViewControllerWithTableViewDescription.h; sourceTree = ""; }; 55 | C255BDE01945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOViewControllerWithTableViewDescription.m; sourceTree = ""; }; 56 | C255BDEE1945DE0A00EBDF76 /* JMOTableViewDescriptionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionCell.h; sourceTree = ""; }; 57 | C255BDEF1945DE0A00EBDF76 /* JMOTableViewDescriptionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewDescriptionCell.m; sourceTree = ""; }; 58 | C255BDF11945DE4E00EBDF76 /* JMOTableViewSectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewSectionView.h; sourceTree = ""; }; 59 | C255BDF21945DE4E00EBDF76 /* JMOTableViewSectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewSectionView.m; sourceTree = ""; }; 60 | C255BDF41945DEC200EBDF76 /* JMOTableViewDescriptionUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionUI.h; sourceTree = ""; }; 61 | C255BDF51945DEE800EBDF76 /* JMOTableViewDescriptionControllers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionControllers.h; sourceTree = ""; }; 62 | C255BDF61945DFA300EBDF76 /* JMOTableViewDescriptionCellUpdate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionCellUpdate.h; sourceTree = ""; }; 63 | C255BDF71945DFFF00EBDF76 /* JMOTableViewDescriptionSectionUpdate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionSectionUpdate.h; sourceTree = ""; }; 64 | C255BDF91945E68D00EBDF76 /* JMOTableViewDescriptionHeaders.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionHeaders.h; sourceTree = ""; }; 65 | C255BDFA1945E6DB00EBDF76 /* JMOTableViewDescriptionModels.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionModels.h; sourceTree = ""; }; 66 | C255BDFB1945E80C00EBDF76 /* JMOSectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOSectionView.h; sourceTree = ""; }; 67 | C255BDFC1945E80C00EBDF76 /* JMOSectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOSectionView.m; sourceTree = ""; }; 68 | C255BE011945F4C000EBDF76 /* JMOTableViewDescriptionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionDelegate.h; sourceTree = ""; }; 69 | C280755218E61C390068961F /* JMOTableViewCellRed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewCellRed.h; sourceTree = ""; }; 70 | C280755318E61C390068961F /* JMOTableViewCellRed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewCellRed.m; sourceTree = ""; }; 71 | C280755518E61C760068961F /* JMOTableViewCellBlue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewCellBlue.h; sourceTree = ""; }; 72 | C280755618E61C760068961F /* JMOTableViewCellBlue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewCellBlue.m; sourceTree = ""; }; 73 | C280755818E6212F0068961F /* JMOTableViewCellGreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewCellGreen.h; sourceTree = ""; }; 74 | C280755918E6212F0068961F /* JMOTableViewCellGreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewCellGreen.m; sourceTree = ""; }; 75 | C280756218E7180F0068961F /* JMOTableViewDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescription.h; sourceTree = ""; }; 76 | C280756318E7180F0068961F /* JMOTableViewDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewDescription.m; sourceTree = ""; }; 77 | C280756418E7180F0068961F /* JMOTableViewRowDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewRowDescription.h; sourceTree = ""; }; 78 | C280756518E7180F0068961F /* JMOTableViewRowDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewRowDescription.m; sourceTree = ""; }; 79 | C280756618E7180F0068961F /* JMOTableViewSectionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewSectionDescription.h; sourceTree = ""; }; 80 | C280756718E7180F0068961F /* JMOTableViewSectionDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewSectionDescription.m; sourceTree = ""; }; 81 | C280756818E7180F0068961F /* UITableView+TableViewDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+TableViewDescription.h"; sourceTree = ""; }; 82 | C280756918E7180F0068961F /* UITableView+TableViewDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+TableViewDescription.m"; sourceTree = ""; }; 83 | C29D1A8C18DAC0A80011C2E7 /* TableViewDescription.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TableViewDescription.app; sourceTree = BUILT_PRODUCTS_DIR; }; 84 | C29D1A8F18DAC0A80011C2E7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 85 | C29D1A9118DAC0A80011C2E7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 86 | C29D1A9318DAC0A80011C2E7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 87 | C29D1A9718DAC0A80011C2E7 /* TableViewDescription-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TableViewDescription-Info.plist"; sourceTree = ""; }; 88 | C29D1A9918DAC0A80011C2E7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 89 | C29D1A9B18DAC0A80011C2E7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 90 | C29D1A9D18DAC0A80011C2E7 /* TableViewDescription-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TableViewDescription-Prefix.pch"; sourceTree = ""; }; 91 | C29D1A9E18DAC0A80011C2E7 /* JMOAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOAppDelegate.h; sourceTree = ""; }; 92 | C29D1A9F18DAC0A80011C2E7 /* JMOAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JMOAppDelegate.m; sourceTree = ""; }; 93 | C29D1AA218DAC0A80011C2E7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 94 | C29D1AA418DAC0A80011C2E7 /* JMOViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JMOViewController.h; sourceTree = ""; }; 95 | C29D1AA518DAC0A80011C2E7 /* JMOViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JMOViewController.m; sourceTree = ""; }; 96 | C29D1AA718DAC0A80011C2E7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 97 | C29D1AAD18DAC0A80011C2E7 /* TableViewDescriptionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TableViewDescriptionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 98 | C29D1AAE18DAC0A80011C2E7 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 99 | C29D1AB618DAC0A80011C2E7 /* TableViewDescriptionTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TableViewDescriptionTests-Info.plist"; sourceTree = ""; }; 100 | C29D1AB818DAC0A80011C2E7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 101 | C29D1ABA18DAC0A80011C2E7 /* TableViewDescriptionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TableViewDescriptionTests.m; sourceTree = ""; }; 102 | C29D1ACE18DAC3010011C2E7 /* JMODemoTableViewDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMODemoTableViewDescription.h; sourceTree = ""; }; 103 | C29D1ACF18DAC3010011C2E7 /* JMODemoTableViewDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMODemoTableViewDescription.m; sourceTree = ""; }; 104 | C2A667851DB3A49F00676825 /* JMOTableViewNibCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewNibCell.h; sourceTree = ""; }; 105 | C2A667861DB3A49F00676825 /* JMOTableViewNibCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewNibCell.m; sourceTree = ""; }; 106 | C2A667881DB3A4B200676825 /* JMOTableViewNibCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = JMOTableViewNibCell.xib; sourceTree = ""; }; 107 | C2A6678A1DB3AF3900676825 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; 108 | C2A6678C1DB3AFC800676825 /* JMOTableViewDescription.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JMOTableViewDescription.podspec; sourceTree = ""; }; 109 | C2EB6C541A92029400A6DE03 /* JMOTableViewDescriptionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMOTableViewDescriptionController.h; sourceTree = ""; }; 110 | C2EB6C551A92029400A6DE03 /* JMOTableViewDescriptionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMOTableViewDescriptionController.m; sourceTree = ""; }; 111 | /* End PBXFileReference section */ 112 | 113 | /* Begin PBXFrameworksBuildPhase section */ 114 | C29D1A8918DAC0A80011C2E7 /* Frameworks */ = { 115 | isa = PBXFrameworksBuildPhase; 116 | buildActionMask = 2147483647; 117 | files = ( 118 | C29D1A9218DAC0A80011C2E7 /* CoreGraphics.framework in Frameworks */, 119 | C29D1A9418DAC0A80011C2E7 /* UIKit.framework in Frameworks */, 120 | C29D1A9018DAC0A80011C2E7 /* Foundation.framework in Frameworks */, 121 | ); 122 | runOnlyForDeploymentPostprocessing = 0; 123 | }; 124 | C29D1AAA18DAC0A80011C2E7 /* Frameworks */ = { 125 | isa = PBXFrameworksBuildPhase; 126 | buildActionMask = 2147483647; 127 | files = ( 128 | C29D1AAF18DAC0A80011C2E7 /* XCTest.framework in Frameworks */, 129 | C29D1AB118DAC0A80011C2E7 /* UIKit.framework in Frameworks */, 130 | C29D1AB018DAC0A80011C2E7 /* Foundation.framework in Frameworks */, 131 | ); 132 | runOnlyForDeploymentPostprocessing = 0; 133 | }; 134 | /* End PBXFrameworksBuildPhase section */ 135 | 136 | /* Begin PBXGroup section */ 137 | C255BDEB1945DDA600EBDF76 /* ModelDescriptions */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | C255BDFA1945E6DB00EBDF76 /* JMOTableViewDescriptionModels.h */, 141 | C280756218E7180F0068961F /* JMOTableViewDescription.h */, 142 | C280756318E7180F0068961F /* JMOTableViewDescription.m */, 143 | C280756418E7180F0068961F /* JMOTableViewRowDescription.h */, 144 | C280756518E7180F0068961F /* JMOTableViewRowDescription.m */, 145 | C280756618E7180F0068961F /* JMOTableViewSectionDescription.h */, 146 | C280756718E7180F0068961F /* JMOTableViewSectionDescription.m */, 147 | ); 148 | name = ModelDescriptions; 149 | sourceTree = ""; 150 | }; 151 | C255BDEC1945DDB400EBDF76 /* Controller */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | C255BDF51945DEE800EBDF76 /* JMOTableViewDescriptionControllers.h */, 155 | C2EB6C541A92029400A6DE03 /* JMOTableViewDescriptionController.h */, 156 | C2EB6C551A92029400A6DE03 /* JMOTableViewDescriptionController.m */, 157 | C255BDDF1945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.h */, 158 | C255BDE01945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.m */, 159 | ); 160 | name = Controller; 161 | sourceTree = ""; 162 | }; 163 | C255BDED1945DDBD00EBDF76 /* UIElements */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | C255BDF41945DEC200EBDF76 /* JMOTableViewDescriptionUI.h */, 167 | C280756818E7180F0068961F /* UITableView+TableViewDescription.h */, 168 | C280756918E7180F0068961F /* UITableView+TableViewDescription.m */, 169 | C255BDEE1945DE0A00EBDF76 /* JMOTableViewDescriptionCell.h */, 170 | C255BDEF1945DE0A00EBDF76 /* JMOTableViewDescriptionCell.m */, 171 | C255BDF11945DE4E00EBDF76 /* JMOTableViewSectionView.h */, 172 | C255BDF21945DE4E00EBDF76 /* JMOTableViewSectionView.m */, 173 | ); 174 | name = UIElements; 175 | sourceTree = ""; 176 | }; 177 | C255BDF81945E00700EBDF76 /* Protocols */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | C255BE011945F4C000EBDF76 /* JMOTableViewDescriptionDelegate.h */, 181 | C255BDF61945DFA300EBDF76 /* JMOTableViewDescriptionCellUpdate.h */, 182 | C255BDF71945DFFF00EBDF76 /* JMOTableViewDescriptionSectionUpdate.h */, 183 | ); 184 | name = Protocols; 185 | sourceTree = ""; 186 | }; 187 | C280755118E61C1D0068961F /* Cells */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | C255BDFB1945E80C00EBDF76 /* JMOSectionView.h */, 191 | C255BDFC1945E80C00EBDF76 /* JMOSectionView.m */, 192 | C280755218E61C390068961F /* JMOTableViewCellRed.h */, 193 | C280755318E61C390068961F /* JMOTableViewCellRed.m */, 194 | C280755518E61C760068961F /* JMOTableViewCellBlue.h */, 195 | C280755618E61C760068961F /* JMOTableViewCellBlue.m */, 196 | C280755818E6212F0068961F /* JMOTableViewCellGreen.h */, 197 | C280755918E6212F0068961F /* JMOTableViewCellGreen.m */, 198 | C2A667851DB3A49F00676825 /* JMOTableViewNibCell.h */, 199 | C2A667861DB3A49F00676825 /* JMOTableViewNibCell.m */, 200 | C2A667881DB3A4B200676825 /* JMOTableViewNibCell.xib */, 201 | ); 202 | name = Cells; 203 | sourceTree = ""; 204 | }; 205 | C280756118E7180F0068961F /* JMOTableViewDescription */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | C255BDF91945E68D00EBDF76 /* JMOTableViewDescriptionHeaders.h */, 209 | C255BDF81945E00700EBDF76 /* Protocols */, 210 | C255BDEB1945DDA600EBDF76 /* ModelDescriptions */, 211 | C255BDEC1945DDB400EBDF76 /* Controller */, 212 | C255BDED1945DDBD00EBDF76 /* UIElements */, 213 | ); 214 | name = JMOTableViewDescription; 215 | path = TableViewDescription/JMOTableViewDescription; 216 | sourceTree = ""; 217 | }; 218 | C29D1A8318DAC0A80011C2E7 = { 219 | isa = PBXGroup; 220 | children = ( 221 | C2A6678A1DB3AF3900676825 /* Launch Screen.storyboard */, 222 | C2A6678C1DB3AFC800676825 /* JMOTableViewDescription.podspec */, 223 | C29D1A9518DAC0A80011C2E7 /* TableViewDescription */, 224 | C29D1AB418DAC0A80011C2E7 /* TableViewDescriptionTests */, 225 | C29D1A8E18DAC0A80011C2E7 /* Frameworks */, 226 | C29D1A8D18DAC0A80011C2E7 /* Products */, 227 | ); 228 | sourceTree = ""; 229 | }; 230 | C29D1A8D18DAC0A80011C2E7 /* Products */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | C29D1A8C18DAC0A80011C2E7 /* TableViewDescription.app */, 234 | C29D1AAD18DAC0A80011C2E7 /* TableViewDescriptionTests.xctest */, 235 | ); 236 | name = Products; 237 | sourceTree = ""; 238 | }; 239 | C29D1A8E18DAC0A80011C2E7 /* Frameworks */ = { 240 | isa = PBXGroup; 241 | children = ( 242 | C280756118E7180F0068961F /* JMOTableViewDescription */, 243 | C29D1A8F18DAC0A80011C2E7 /* Foundation.framework */, 244 | C29D1A9118DAC0A80011C2E7 /* CoreGraphics.framework */, 245 | C29D1A9318DAC0A80011C2E7 /* UIKit.framework */, 246 | C29D1AAE18DAC0A80011C2E7 /* XCTest.framework */, 247 | ); 248 | name = Frameworks; 249 | sourceTree = ""; 250 | }; 251 | C29D1A9518DAC0A80011C2E7 /* TableViewDescription */ = { 252 | isa = PBXGroup; 253 | children = ( 254 | C29D1A9E18DAC0A80011C2E7 /* JMOAppDelegate.h */, 255 | C29D1A9F18DAC0A80011C2E7 /* JMOAppDelegate.m */, 256 | C29D1AA118DAC0A80011C2E7 /* Main.storyboard */, 257 | C29D1AA418DAC0A80011C2E7 /* JMOViewController.h */, 258 | C29D1AA518DAC0A80011C2E7 /* JMOViewController.m */, 259 | C29D1ACE18DAC3010011C2E7 /* JMODemoTableViewDescription.h */, 260 | C29D1ACF18DAC3010011C2E7 /* JMODemoTableViewDescription.m */, 261 | C280755118E61C1D0068961F /* Cells */, 262 | C29D1AA718DAC0A80011C2E7 /* Images.xcassets */, 263 | C29D1A9618DAC0A80011C2E7 /* Supporting Files */, 264 | ); 265 | path = TableViewDescription; 266 | sourceTree = ""; 267 | }; 268 | C29D1A9618DAC0A80011C2E7 /* Supporting Files */ = { 269 | isa = PBXGroup; 270 | children = ( 271 | C29D1A9718DAC0A80011C2E7 /* TableViewDescription-Info.plist */, 272 | C29D1A9818DAC0A80011C2E7 /* InfoPlist.strings */, 273 | C29D1A9B18DAC0A80011C2E7 /* main.m */, 274 | C29D1A9D18DAC0A80011C2E7 /* TableViewDescription-Prefix.pch */, 275 | ); 276 | name = "Supporting Files"; 277 | sourceTree = ""; 278 | }; 279 | C29D1AB418DAC0A80011C2E7 /* TableViewDescriptionTests */ = { 280 | isa = PBXGroup; 281 | children = ( 282 | C29D1ABA18DAC0A80011C2E7 /* TableViewDescriptionTests.m */, 283 | C29D1AB518DAC0A80011C2E7 /* Supporting Files */, 284 | ); 285 | path = TableViewDescriptionTests; 286 | sourceTree = ""; 287 | }; 288 | C29D1AB518DAC0A80011C2E7 /* Supporting Files */ = { 289 | isa = PBXGroup; 290 | children = ( 291 | C29D1AB618DAC0A80011C2E7 /* TableViewDescriptionTests-Info.plist */, 292 | C29D1AB718DAC0A80011C2E7 /* InfoPlist.strings */, 293 | ); 294 | name = "Supporting Files"; 295 | sourceTree = ""; 296 | }; 297 | /* End PBXGroup section */ 298 | 299 | /* Begin PBXNativeTarget section */ 300 | C29D1A8B18DAC0A80011C2E7 /* TableViewDescription */ = { 301 | isa = PBXNativeTarget; 302 | buildConfigurationList = C29D1ABE18DAC0A80011C2E7 /* Build configuration list for PBXNativeTarget "TableViewDescription" */; 303 | buildPhases = ( 304 | C29D1A8818DAC0A80011C2E7 /* Sources */, 305 | C29D1A8918DAC0A80011C2E7 /* Frameworks */, 306 | C29D1A8A18DAC0A80011C2E7 /* Resources */, 307 | ); 308 | buildRules = ( 309 | ); 310 | dependencies = ( 311 | ); 312 | name = TableViewDescription; 313 | productName = TableViewDescription; 314 | productReference = C29D1A8C18DAC0A80011C2E7 /* TableViewDescription.app */; 315 | productType = "com.apple.product-type.application"; 316 | }; 317 | C29D1AAC18DAC0A80011C2E7 /* TableViewDescriptionTests */ = { 318 | isa = PBXNativeTarget; 319 | buildConfigurationList = C29D1AC118DAC0A80011C2E7 /* Build configuration list for PBXNativeTarget "TableViewDescriptionTests" */; 320 | buildPhases = ( 321 | C29D1AA918DAC0A80011C2E7 /* Sources */, 322 | C29D1AAA18DAC0A80011C2E7 /* Frameworks */, 323 | C29D1AAB18DAC0A80011C2E7 /* Resources */, 324 | ); 325 | buildRules = ( 326 | ); 327 | dependencies = ( 328 | C29D1AB318DAC0A80011C2E7 /* PBXTargetDependency */, 329 | ); 330 | name = TableViewDescriptionTests; 331 | productName = TableViewDescriptionTests; 332 | productReference = C29D1AAD18DAC0A80011C2E7 /* TableViewDescriptionTests.xctest */; 333 | productType = "com.apple.product-type.bundle.unit-test"; 334 | }; 335 | /* End PBXNativeTarget section */ 336 | 337 | /* Begin PBXProject section */ 338 | C29D1A8418DAC0A80011C2E7 /* Project object */ = { 339 | isa = PBXProject; 340 | attributes = { 341 | CLASSPREFIX = JMO; 342 | LastUpgradeCheck = 0510; 343 | ORGANIZATIONNAME = "Jerome Morissard"; 344 | TargetAttributes = { 345 | C29D1A8B18DAC0A80011C2E7 = { 346 | ProvisioningStyle = Manual; 347 | }; 348 | C29D1AAC18DAC0A80011C2E7 = { 349 | TestTargetID = C29D1A8B18DAC0A80011C2E7; 350 | }; 351 | }; 352 | }; 353 | buildConfigurationList = C29D1A8718DAC0A80011C2E7 /* Build configuration list for PBXProject "TableViewDescription" */; 354 | compatibilityVersion = "Xcode 3.2"; 355 | developmentRegion = English; 356 | hasScannedForEncodings = 0; 357 | knownRegions = ( 358 | en, 359 | Base, 360 | ); 361 | mainGroup = C29D1A8318DAC0A80011C2E7; 362 | productRefGroup = C29D1A8D18DAC0A80011C2E7 /* Products */; 363 | projectDirPath = ""; 364 | projectRoot = ""; 365 | targets = ( 366 | C29D1A8B18DAC0A80011C2E7 /* TableViewDescription */, 367 | C29D1AAC18DAC0A80011C2E7 /* TableViewDescriptionTests */, 368 | ); 369 | }; 370 | /* End PBXProject section */ 371 | 372 | /* Begin PBXResourcesBuildPhase section */ 373 | C29D1A8A18DAC0A80011C2E7 /* Resources */ = { 374 | isa = PBXResourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | C29D1AA818DAC0A80011C2E7 /* Images.xcassets in Resources */, 378 | C29D1A9A18DAC0A80011C2E7 /* InfoPlist.strings in Resources */, 379 | C2A6678D1DB3AFC800676825 /* JMOTableViewDescription.podspec in Resources */, 380 | C2A667891DB3A4B200676825 /* JMOTableViewNibCell.xib in Resources */, 381 | C2A6678B1DB3AF3900676825 /* Launch Screen.storyboard in Resources */, 382 | C29D1AA318DAC0A80011C2E7 /* Main.storyboard in Resources */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | C29D1AAB18DAC0A80011C2E7 /* Resources */ = { 387 | isa = PBXResourcesBuildPhase; 388 | buildActionMask = 2147483647; 389 | files = ( 390 | C29D1AB918DAC0A80011C2E7 /* InfoPlist.strings in Resources */, 391 | ); 392 | runOnlyForDeploymentPostprocessing = 0; 393 | }; 394 | /* End PBXResourcesBuildPhase section */ 395 | 396 | /* Begin PBXSourcesBuildPhase section */ 397 | C29D1A8818DAC0A80011C2E7 /* Sources */ = { 398 | isa = PBXSourcesBuildPhase; 399 | buildActionMask = 2147483647; 400 | files = ( 401 | C280756C18E7180F0068961F /* JMOTableViewSectionDescription.m in Sources */, 402 | C280755A18E6212F0068961F /* JMOTableViewCellGreen.m in Sources */, 403 | C2A667871DB3A49F00676825 /* JMOTableViewNibCell.m in Sources */, 404 | C280756A18E7180F0068961F /* JMOTableViewDescription.m in Sources */, 405 | C255BDF31945DE4E00EBDF76 /* JMOTableViewSectionView.m in Sources */, 406 | C280756D18E7180F0068961F /* UITableView+TableViewDescription.m in Sources */, 407 | C255BDFD1945E80C00EBDF76 /* JMOSectionView.m in Sources */, 408 | C280755418E61C390068961F /* JMOTableViewCellRed.m in Sources */, 409 | C29D1A9C18DAC0A80011C2E7 /* main.m in Sources */, 410 | C255BDE11945CD8B00EBDF76 /* JMOViewControllerWithTableViewDescription.m in Sources */, 411 | C29D1AD018DAC3010011C2E7 /* JMODemoTableViewDescription.m in Sources */, 412 | C280755718E61C760068961F /* JMOTableViewCellBlue.m in Sources */, 413 | C255BDF01945DE0A00EBDF76 /* JMOTableViewDescriptionCell.m in Sources */, 414 | C29D1AA618DAC0A80011C2E7 /* JMOViewController.m in Sources */, 415 | C2EB6C561A92029400A6DE03 /* JMOTableViewDescriptionController.m in Sources */, 416 | C29D1AA018DAC0A80011C2E7 /* JMOAppDelegate.m in Sources */, 417 | C280756B18E7180F0068961F /* JMOTableViewRowDescription.m in Sources */, 418 | ); 419 | runOnlyForDeploymentPostprocessing = 0; 420 | }; 421 | C29D1AA918DAC0A80011C2E7 /* Sources */ = { 422 | isa = PBXSourcesBuildPhase; 423 | buildActionMask = 2147483647; 424 | files = ( 425 | C29D1ABB18DAC0A80011C2E7 /* TableViewDescriptionTests.m in Sources */, 426 | ); 427 | runOnlyForDeploymentPostprocessing = 0; 428 | }; 429 | /* End PBXSourcesBuildPhase section */ 430 | 431 | /* Begin PBXTargetDependency section */ 432 | C29D1AB318DAC0A80011C2E7 /* PBXTargetDependency */ = { 433 | isa = PBXTargetDependency; 434 | target = C29D1A8B18DAC0A80011C2E7 /* TableViewDescription */; 435 | targetProxy = C29D1AB218DAC0A80011C2E7 /* PBXContainerItemProxy */; 436 | }; 437 | /* End PBXTargetDependency section */ 438 | 439 | /* Begin PBXVariantGroup section */ 440 | C29D1A9818DAC0A80011C2E7 /* InfoPlist.strings */ = { 441 | isa = PBXVariantGroup; 442 | children = ( 443 | C29D1A9918DAC0A80011C2E7 /* en */, 444 | ); 445 | name = InfoPlist.strings; 446 | sourceTree = ""; 447 | }; 448 | C29D1AA118DAC0A80011C2E7 /* Main.storyboard */ = { 449 | isa = PBXVariantGroup; 450 | children = ( 451 | C29D1AA218DAC0A80011C2E7 /* Base */, 452 | ); 453 | name = Main.storyboard; 454 | sourceTree = ""; 455 | }; 456 | C29D1AB718DAC0A80011C2E7 /* InfoPlist.strings */ = { 457 | isa = PBXVariantGroup; 458 | children = ( 459 | C29D1AB818DAC0A80011C2E7 /* en */, 460 | ); 461 | name = InfoPlist.strings; 462 | sourceTree = ""; 463 | }; 464 | /* End PBXVariantGroup section */ 465 | 466 | /* Begin XCBuildConfiguration section */ 467 | C29D1ABC18DAC0A80011C2E7 /* Debug */ = { 468 | isa = XCBuildConfiguration; 469 | buildSettings = { 470 | ALWAYS_SEARCH_USER_PATHS = NO; 471 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 472 | CLANG_CXX_LIBRARY = "libc++"; 473 | CLANG_ENABLE_MODULES = YES; 474 | CLANG_ENABLE_OBJC_ARC = YES; 475 | CLANG_WARN_BOOL_CONVERSION = YES; 476 | CLANG_WARN_CONSTANT_CONVERSION = YES; 477 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 478 | CLANG_WARN_EMPTY_BODY = YES; 479 | CLANG_WARN_ENUM_CONVERSION = YES; 480 | CLANG_WARN_INT_CONVERSION = YES; 481 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | COPY_PHASE_STRIP = NO; 485 | GCC_C_LANGUAGE_STANDARD = gnu99; 486 | GCC_DYNAMIC_NO_PIC = NO; 487 | GCC_OPTIMIZATION_LEVEL = 0; 488 | GCC_PREPROCESSOR_DEFINITIONS = ( 489 | "DEBUG=1", 490 | "$(inherited)", 491 | ); 492 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 493 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 494 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 495 | GCC_WARN_UNDECLARED_SELECTOR = YES; 496 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 497 | GCC_WARN_UNUSED_FUNCTION = YES; 498 | GCC_WARN_UNUSED_VARIABLE = YES; 499 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 500 | ONLY_ACTIVE_ARCH = YES; 501 | SDKROOT = iphoneos; 502 | }; 503 | name = Debug; 504 | }; 505 | C29D1ABD18DAC0A80011C2E7 /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | ALWAYS_SEARCH_USER_PATHS = NO; 509 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 510 | CLANG_CXX_LIBRARY = "libc++"; 511 | CLANG_ENABLE_MODULES = YES; 512 | CLANG_ENABLE_OBJC_ARC = YES; 513 | CLANG_WARN_BOOL_CONVERSION = YES; 514 | CLANG_WARN_CONSTANT_CONVERSION = YES; 515 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 516 | CLANG_WARN_EMPTY_BODY = YES; 517 | CLANG_WARN_ENUM_CONVERSION = YES; 518 | CLANG_WARN_INT_CONVERSION = YES; 519 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 520 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 521 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 522 | COPY_PHASE_STRIP = YES; 523 | ENABLE_NS_ASSERTIONS = NO; 524 | GCC_C_LANGUAGE_STANDARD = gnu99; 525 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 526 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 527 | GCC_WARN_UNDECLARED_SELECTOR = YES; 528 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 529 | GCC_WARN_UNUSED_FUNCTION = YES; 530 | GCC_WARN_UNUSED_VARIABLE = YES; 531 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 532 | SDKROOT = iphoneos; 533 | VALIDATE_PRODUCT = YES; 534 | }; 535 | name = Release; 536 | }; 537 | C29D1ABF18DAC0A80011C2E7 /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 541 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 542 | DEVELOPMENT_TEAM = ""; 543 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 544 | GCC_PREFIX_HEADER = "TableViewDescription/TableViewDescription-Prefix.pch"; 545 | INFOPLIST_FILE = "TableViewDescription/TableViewDescription-Info.plist"; 546 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 547 | PRODUCT_NAME = "$(TARGET_NAME)"; 548 | WRAPPER_EXTENSION = app; 549 | }; 550 | name = Debug; 551 | }; 552 | C29D1AC018DAC0A80011C2E7 /* Release */ = { 553 | isa = XCBuildConfiguration; 554 | buildSettings = { 555 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 556 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 557 | DEVELOPMENT_TEAM = ""; 558 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 559 | GCC_PREFIX_HEADER = "TableViewDescription/TableViewDescription-Prefix.pch"; 560 | INFOPLIST_FILE = "TableViewDescription/TableViewDescription-Info.plist"; 561 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | WRAPPER_EXTENSION = app; 564 | }; 565 | name = Release; 566 | }; 567 | C29D1AC218DAC0A80011C2E7 /* Debug */ = { 568 | isa = XCBuildConfiguration; 569 | buildSettings = { 570 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TableViewDescription.app/TableViewDescription"; 571 | FRAMEWORK_SEARCH_PATHS = ( 572 | "$(SDKROOT)/Developer/Library/Frameworks", 573 | "$(inherited)", 574 | "$(DEVELOPER_FRAMEWORKS_DIR)", 575 | ); 576 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 577 | GCC_PREFIX_HEADER = "TableViewDescription/TableViewDescription-Prefix.pch"; 578 | GCC_PREPROCESSOR_DEFINITIONS = ( 579 | "DEBUG=1", 580 | "$(inherited)", 581 | ); 582 | INFOPLIST_FILE = "TableViewDescriptionTests/TableViewDescriptionTests-Info.plist"; 583 | PRODUCT_NAME = "$(TARGET_NAME)"; 584 | TEST_HOST = "$(BUNDLE_LOADER)"; 585 | WRAPPER_EXTENSION = xctest; 586 | }; 587 | name = Debug; 588 | }; 589 | C29D1AC318DAC0A80011C2E7 /* Release */ = { 590 | isa = XCBuildConfiguration; 591 | buildSettings = { 592 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TableViewDescription.app/TableViewDescription"; 593 | FRAMEWORK_SEARCH_PATHS = ( 594 | "$(SDKROOT)/Developer/Library/Frameworks", 595 | "$(inherited)", 596 | "$(DEVELOPER_FRAMEWORKS_DIR)", 597 | ); 598 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 599 | GCC_PREFIX_HEADER = "TableViewDescription/TableViewDescription-Prefix.pch"; 600 | INFOPLIST_FILE = "TableViewDescriptionTests/TableViewDescriptionTests-Info.plist"; 601 | PRODUCT_NAME = "$(TARGET_NAME)"; 602 | TEST_HOST = "$(BUNDLE_LOADER)"; 603 | WRAPPER_EXTENSION = xctest; 604 | }; 605 | name = Release; 606 | }; 607 | /* End XCBuildConfiguration section */ 608 | 609 | /* Begin XCConfigurationList section */ 610 | C29D1A8718DAC0A80011C2E7 /* Build configuration list for PBXProject "TableViewDescription" */ = { 611 | isa = XCConfigurationList; 612 | buildConfigurations = ( 613 | C29D1ABC18DAC0A80011C2E7 /* Debug */, 614 | C29D1ABD18DAC0A80011C2E7 /* Release */, 615 | ); 616 | defaultConfigurationIsVisible = 0; 617 | defaultConfigurationName = Release; 618 | }; 619 | C29D1ABE18DAC0A80011C2E7 /* Build configuration list for PBXNativeTarget "TableViewDescription" */ = { 620 | isa = XCConfigurationList; 621 | buildConfigurations = ( 622 | C29D1ABF18DAC0A80011C2E7 /* Debug */, 623 | C29D1AC018DAC0A80011C2E7 /* Release */, 624 | ); 625 | defaultConfigurationIsVisible = 0; 626 | defaultConfigurationName = Release; 627 | }; 628 | C29D1AC118DAC0A80011C2E7 /* Build configuration list for PBXNativeTarget "TableViewDescriptionTests" */ = { 629 | isa = XCConfigurationList; 630 | buildConfigurations = ( 631 | C29D1AC218DAC0A80011C2E7 /* Debug */, 632 | C29D1AC318DAC0A80011C2E7 /* Release */, 633 | ); 634 | defaultConfigurationIsVisible = 0; 635 | defaultConfigurationName = Release; 636 | }; 637 | /* End XCConfigurationList section */ 638 | }; 639 | rootObject = C29D1A8418DAC0A80011C2E7 /* Project object */; 640 | } 641 | --------------------------------------------------------------------------------