├── .gitignore ├── Podfile ├── objectionViper.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── saiakirahui.xcuserdatad │ └── xcschemes │ ├── objectionViper.xcscheme │ └── xcschememanagement.plist ├── objectionViper ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── LaunchScreen.xib ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── VTD-Prefix.pch ├── VTDApplication │ ├── Classes │ │ ├── Common │ │ │ ├── Category │ │ │ │ ├── NSArray+VTDObjectsCollector.h │ │ │ │ └── NSArray+VTDObjectsCollector.m │ │ │ ├── Core │ │ │ │ ├── VTDCoreModule.h │ │ │ │ ├── VTDCoreModule.m │ │ │ │ └── VTDCoreProtocol.h │ │ │ ├── Model │ │ │ │ ├── VTDTodoItem.h │ │ │ │ └── VTDTodoItem.m │ │ │ ├── Provider │ │ │ │ ├── VTDTodoItemProvider.h │ │ │ │ └── VTDTodoItemProvider.m │ │ │ ├── Store │ │ │ │ ├── Entities │ │ │ │ │ ├── VTDManagedTodoItem.h │ │ │ │ │ └── VTDManagedTodoItem.m │ │ │ │ ├── VTDCoreDataStore.h │ │ │ │ ├── VTDCoreDataStore.m │ │ │ │ └── VTDModel.xcdatamodeld │ │ │ │ │ └── VTDModel.xcdatamodel │ │ │ │ │ └── contents │ │ │ └── View │ │ │ │ ├── VTDWireFrame.h │ │ │ │ └── VTDWireFrame.m │ │ ├── Modules │ │ │ ├── Add │ │ │ │ ├── Application Logic │ │ │ │ │ ├── Interactor │ │ │ │ │ │ ├── VTDAddInteractor.h │ │ │ │ │ │ └── VTDAddInteractor.m │ │ │ │ │ └── Manager │ │ │ │ │ │ ├── VTDAddDataManager.h │ │ │ │ │ │ └── VTDAddDataManager.m │ │ │ │ ├── Module Interface │ │ │ │ │ ├── VTDAddModule.h │ │ │ │ │ ├── VTDAddModule.m │ │ │ │ │ └── VTDAddProtocol.h │ │ │ │ └── User Interface │ │ │ │ │ ├── Presenter │ │ │ │ │ ├── VTDAddPresenter.h │ │ │ │ │ └── VTDAddPresenter.m │ │ │ │ │ ├── Transition │ │ │ │ │ ├── VTDAddDismissTransition.h │ │ │ │ │ ├── VTDAddDismissTransition.m │ │ │ │ │ ├── VTDAddPresentationTransition.h │ │ │ │ │ └── VTDAddPresentationTransition.m │ │ │ │ │ ├── View │ │ │ │ │ ├── VTDAddViewController.h │ │ │ │ │ └── VTDAddViewController.m │ │ │ │ │ └── Wireframe │ │ │ │ │ ├── VTDAddWireFrame.h │ │ │ │ │ └── VTDAddWireFrame.m │ │ │ └── List │ │ │ │ ├── Application Logic │ │ │ │ ├── Interactor │ │ │ │ │ ├── VTDListInteractor.h │ │ │ │ │ ├── VTDListInteractor.m │ │ │ │ │ ├── VTDListUpcomingItem.h │ │ │ │ │ └── VTDListUpcomingItem.m │ │ │ │ ├── Manager │ │ │ │ │ ├── VTDListDataManager.h │ │ │ │ │ └── VTDListDataManager.m │ │ │ │ └── Provider │ │ │ │ │ ├── VTDListUpcomingItemProvider.h │ │ │ │ │ └── VTDListUpcomingItemProvider.m │ │ │ │ ├── Module Interface │ │ │ │ ├── VTDListModule.h │ │ │ │ ├── VTDListModule.m │ │ │ │ └── VTDListProtocol.h │ │ │ │ └── User Interface │ │ │ │ ├── Presenter │ │ │ │ ├── VTDListPresenter.h │ │ │ │ ├── VTDListPresenter.m │ │ │ │ ├── VTDListTableViewCellPresenter.h │ │ │ │ └── VTDListTableViewCellPresenter.m │ │ │ │ ├── View │ │ │ │ ├── VTDListTableViewCell.h │ │ │ │ ├── VTDListTableViewCell.m │ │ │ │ ├── VTDListViewController.h │ │ │ │ └── VTDListViewController.m │ │ │ │ └── Wireframe │ │ │ │ ├── VTDListWireFrame.h │ │ │ │ └── VTDListWireFrame.m │ │ ├── VTDApplication.h │ │ └── VTDApplication.m │ └── Resources │ │ ├── VTD.storyboard │ │ └── VTDListTableViewCell.xib └── main.m └── objectionViperTests ├── Info.plist ├── VTDListTests.m └── objectionViperTests.m /.gitignore: -------------------------------------------------------------------------------- 1 | Pods/* 2 | Podfile.lock 3 | *.xcworkspace/* -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '6.0' 3 | 4 | target 'objectionViper' do 5 | 6 | pod "Objection" 7 | 8 | end 9 | 10 | target 'objectionViperTests' do 11 | 12 | pod "Objection" 13 | 14 | end 15 | 16 | -------------------------------------------------------------------------------- /objectionViper.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 639F78CD1A6DF9D700654082 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 639F78CC1A6DF9D700654082 /* main.m */; }; 11 | 639F78D01A6DF9D700654082 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 639F78CF1A6DF9D700654082 /* AppDelegate.m */; }; 12 | 639F78D81A6DF9D700654082 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 639F78D71A6DF9D700654082 /* Images.xcassets */; }; 13 | 639F78DB1A6DF9D700654082 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639F78D91A6DF9D700654082 /* LaunchScreen.xib */; }; 14 | 639F78E71A6DF9D800654082 /* objectionViperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 639F78E61A6DF9D800654082 /* objectionViperTests.m */; }; 15 | 63ADC70C1A6E15510048E2C7 /* VTDListModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 63ADC70B1A6E15510048E2C7 /* VTDListModule.m */; }; 16 | 63ADC7101A6E23290048E2C7 /* VTDListWireFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 63ADC70F1A6E23290048E2C7 /* VTDListWireFrame.m */; }; 17 | 63ADC7141A6E24040048E2C7 /* VTDWireFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 63ADC7131A6E24040048E2C7 /* VTDWireFrame.m */; }; 18 | 63ADC7181A6E251D0048E2C7 /* VTDCoreModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 63ADC7171A6E251D0048E2C7 /* VTDCoreModule.m */; }; 19 | 63ADC71C1A6E28E80048E2C7 /* VTD.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63ADC71B1A6E28E80048E2C7 /* VTD.storyboard */; }; 20 | 63ADC71F1A6E2D7A0048E2C7 /* VTDListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63ADC71E1A6E2D7A0048E2C7 /* VTDListViewController.m */; }; 21 | 63ADC7221A6E30E60048E2C7 /* VTDListPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63ADC7211A6E30E60048E2C7 /* VTDListPresenter.m */; }; 22 | 63C5CEDC1A6E024E00874240 /* VTDApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C5CEDB1A6E024E00874240 /* VTDApplication.m */; }; 23 | 63C5CEE01A6E041800874240 /* VTDModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 63C5CEDE1A6E041800874240 /* VTDModel.xcdatamodeld */; }; 24 | 63C5CEE71A6E056E00874240 /* VTDManagedTodoItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C5CEE61A6E056E00874240 /* VTDManagedTodoItem.m */; }; 25 | 63C5CEE91A6E058500874240 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C5CEE81A6E058500874240 /* CoreData.framework */; }; 26 | 63C5CEEC1A6E05BD00874240 /* VTDCoreDataStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C5CEEB1A6E05BD00874240 /* VTDCoreDataStore.m */; }; 27 | 63F11EA31A6E3879000FF11B /* VTDListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EA21A6E3879000FF11B /* VTDListTableViewCell.m */; }; 28 | 63F11EA51A6E38C2000FF11B /* VTDListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63F11EA41A6E38C2000FF11B /* VTDListTableViewCell.xib */; }; 29 | 63F11EA81A6E3B49000FF11B /* VTDListTableViewCellPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EA71A6E3B49000FF11B /* VTDListTableViewCellPresenter.m */; }; 30 | 63F11EB01A6E4160000FF11B /* VTDAddModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EAF1A6E4160000FF11B /* VTDAddModule.m */; }; 31 | 63F11EB71A6E420F000FF11B /* VTDAddWireFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EB61A6E420F000FF11B /* VTDAddWireFrame.m */; }; 32 | 63F11EBA1A6E4296000FF11B /* VTDAddViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EB91A6E4296000FF11B /* VTDAddViewController.m */; }; 33 | 63F11EBD1A6E42AE000FF11B /* VTDAddPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EBC1A6E42AE000FF11B /* VTDAddPresenter.m */; }; 34 | 63F11EC21A6E470F000FF11B /* VTDAddPresentationTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EC11A6E470F000FF11B /* VTDAddPresentationTransition.m */; }; 35 | 63F11EC51A6E5E51000FF11B /* VTDAddDismissTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EC41A6E5E51000FF11B /* VTDAddDismissTransition.m */; }; 36 | 63F11EC91A6F4A8A000FF11B /* VTDTodoItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EC81A6F4A8A000FF11B /* VTDTodoItem.m */; }; 37 | 63F11ED01A6F4C28000FF11B /* VTDListUpcomingItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11ECF1A6F4C28000FF11B /* VTDListUpcomingItem.m */; }; 38 | 63F11ED31A6F4C3B000FF11B /* VTDListInteractor.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11ED21A6F4C3B000FF11B /* VTDListInteractor.m */; }; 39 | 63F11ED61A6F5137000FF11B /* VTDListUpcomingItemProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11ED51A6F5137000FF11B /* VTDListUpcomingItemProvider.m */; }; 40 | 63F11ED91A6F5193000FF11B /* VTDListDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11ED81A6F5193000FF11B /* VTDListDataManager.m */; }; 41 | 63F11EDB1A6F5374000FF11B /* VTDListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EDA1A6F5374000FF11B /* VTDListTests.m */; }; 42 | 63F11EDE1A6F7479000FF11B /* VTDAddInteractor.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EDD1A6F7479000FF11B /* VTDAddInteractor.m */; }; 43 | 63F11EE11A6F7484000FF11B /* VTDAddDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EE01A6F7484000FF11B /* VTDAddDataManager.m */; }; 44 | 63F11EE51A6F7C44000FF11B /* VTDTodoItemProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EE41A6F7C44000FF11B /* VTDTodoItemProvider.m */; }; 45 | 63F11EE91A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F11EE81A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.m */; }; 46 | 9ACD9069B580729F564CFD8C /* libPods-objectionViperTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E976B9CFB8D9B7DCB7F00E73 /* libPods-objectionViperTests.a */; }; 47 | B0E28354D1282A5B5B67338A /* libPods-objectionViper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F9BAB2911896C5873B212916 /* libPods-objectionViper.a */; }; 48 | /* End PBXBuildFile section */ 49 | 50 | /* Begin PBXContainerItemProxy section */ 51 | 639F78E11A6DF9D700654082 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 639F78BF1A6DF9D700654082 /* Project object */; 54 | proxyType = 1; 55 | remoteGlobalIDString = 639F78C61A6DF9D700654082; 56 | remoteInfo = objectionViper; 57 | }; 58 | /* End PBXContainerItemProxy section */ 59 | 60 | /* Begin PBXFileReference section */ 61 | 639F78C71A6DF9D700654082 /* objectionViper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = objectionViper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 639F78CB1A6DF9D700654082 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | 639F78CC1A6DF9D700654082 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 64 | 639F78CE1A6DF9D700654082 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 65 | 639F78CF1A6DF9D700654082 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 66 | 639F78D71A6DF9D700654082 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 67 | 639F78DA1A6DF9D700654082 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 68 | 639F78E01A6DF9D700654082 /* objectionViperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = objectionViperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | 639F78E51A6DF9D800654082 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 70 | 639F78E61A6DF9D800654082 /* objectionViperTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = objectionViperTests.m; sourceTree = ""; }; 71 | 639F78F01A6DFA1100654082 /* VTD-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VTD-Prefix.pch"; sourceTree = ""; }; 72 | 63ADC70A1A6E15510048E2C7 /* VTDListModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListModule.h; sourceTree = ""; }; 73 | 63ADC70B1A6E15510048E2C7 /* VTDListModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListModule.m; sourceTree = ""; }; 74 | 63ADC70D1A6E156B0048E2C7 /* VTDListProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListProtocol.h; sourceTree = ""; }; 75 | 63ADC70E1A6E23290048E2C7 /* VTDListWireFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListWireFrame.h; sourceTree = ""; }; 76 | 63ADC70F1A6E23290048E2C7 /* VTDListWireFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListWireFrame.m; sourceTree = ""; }; 77 | 63ADC7121A6E24040048E2C7 /* VTDWireFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDWireFrame.h; sourceTree = ""; }; 78 | 63ADC7131A6E24040048E2C7 /* VTDWireFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDWireFrame.m; sourceTree = ""; }; 79 | 63ADC7161A6E251D0048E2C7 /* VTDCoreModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDCoreModule.h; sourceTree = ""; }; 80 | 63ADC7171A6E251D0048E2C7 /* VTDCoreModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDCoreModule.m; sourceTree = ""; }; 81 | 63ADC7191A6E252E0048E2C7 /* VTDCoreProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDCoreProtocol.h; sourceTree = ""; }; 82 | 63ADC71B1A6E28E80048E2C7 /* VTD.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = VTD.storyboard; sourceTree = ""; }; 83 | 63ADC71D1A6E2D7A0048E2C7 /* VTDListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListViewController.h; sourceTree = ""; }; 84 | 63ADC71E1A6E2D7A0048E2C7 /* VTDListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListViewController.m; sourceTree = ""; }; 85 | 63ADC7201A6E30E60048E2C7 /* VTDListPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListPresenter.h; sourceTree = ""; }; 86 | 63ADC7211A6E30E60048E2C7 /* VTDListPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListPresenter.m; sourceTree = ""; }; 87 | 63C5CEDA1A6E024E00874240 /* VTDApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDApplication.h; sourceTree = ""; }; 88 | 63C5CEDB1A6E024E00874240 /* VTDApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDApplication.m; sourceTree = ""; }; 89 | 63C5CEDF1A6E041800874240 /* VTDModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = VTDModel.xcdatamodel; sourceTree = ""; }; 90 | 63C5CEE51A6E056E00874240 /* VTDManagedTodoItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDManagedTodoItem.h; sourceTree = ""; }; 91 | 63C5CEE61A6E056E00874240 /* VTDManagedTodoItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDManagedTodoItem.m; sourceTree = ""; }; 92 | 63C5CEE81A6E058500874240 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 93 | 63C5CEEA1A6E05BD00874240 /* VTDCoreDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDCoreDataStore.h; sourceTree = ""; }; 94 | 63C5CEEB1A6E05BD00874240 /* VTDCoreDataStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDCoreDataStore.m; sourceTree = ""; }; 95 | 63F11EA11A6E3879000FF11B /* VTDListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListTableViewCell.h; sourceTree = ""; }; 96 | 63F11EA21A6E3879000FF11B /* VTDListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListTableViewCell.m; sourceTree = ""; }; 97 | 63F11EA41A6E38C2000FF11B /* VTDListTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VTDListTableViewCell.xib; sourceTree = ""; }; 98 | 63F11EA61A6E3B49000FF11B /* VTDListTableViewCellPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListTableViewCellPresenter.h; sourceTree = ""; }; 99 | 63F11EA71A6E3B49000FF11B /* VTDListTableViewCellPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListTableViewCellPresenter.m; sourceTree = ""; }; 100 | 63F11EAE1A6E4160000FF11B /* VTDAddModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddModule.h; sourceTree = ""; }; 101 | 63F11EAF1A6E4160000FF11B /* VTDAddModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddModule.m; sourceTree = ""; }; 102 | 63F11EB11A6E416C000FF11B /* VTDAddProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddProtocol.h; sourceTree = ""; }; 103 | 63F11EB51A6E420F000FF11B /* VTDAddWireFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddWireFrame.h; sourceTree = ""; }; 104 | 63F11EB61A6E420F000FF11B /* VTDAddWireFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddWireFrame.m; sourceTree = ""; }; 105 | 63F11EB81A6E4296000FF11B /* VTDAddViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddViewController.h; sourceTree = ""; }; 106 | 63F11EB91A6E4296000FF11B /* VTDAddViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddViewController.m; sourceTree = ""; }; 107 | 63F11EBB1A6E42AE000FF11B /* VTDAddPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddPresenter.h; sourceTree = ""; }; 108 | 63F11EBC1A6E42AE000FF11B /* VTDAddPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddPresenter.m; sourceTree = ""; }; 109 | 63F11EC01A6E470F000FF11B /* VTDAddPresentationTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddPresentationTransition.h; sourceTree = ""; }; 110 | 63F11EC11A6E470F000FF11B /* VTDAddPresentationTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddPresentationTransition.m; sourceTree = ""; }; 111 | 63F11EC31A6E5E51000FF11B /* VTDAddDismissTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddDismissTransition.h; sourceTree = ""; }; 112 | 63F11EC41A6E5E51000FF11B /* VTDAddDismissTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddDismissTransition.m; sourceTree = ""; }; 113 | 63F11EC71A6F4A8A000FF11B /* VTDTodoItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDTodoItem.h; sourceTree = ""; }; 114 | 63F11EC81A6F4A8A000FF11B /* VTDTodoItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDTodoItem.m; sourceTree = ""; }; 115 | 63F11ECE1A6F4C28000FF11B /* VTDListUpcomingItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListUpcomingItem.h; sourceTree = ""; }; 116 | 63F11ECF1A6F4C28000FF11B /* VTDListUpcomingItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListUpcomingItem.m; sourceTree = ""; }; 117 | 63F11ED11A6F4C3B000FF11B /* VTDListInteractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListInteractor.h; sourceTree = ""; }; 118 | 63F11ED21A6F4C3B000FF11B /* VTDListInteractor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListInteractor.m; sourceTree = ""; }; 119 | 63F11ED41A6F5137000FF11B /* VTDListUpcomingItemProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListUpcomingItemProvider.h; sourceTree = ""; }; 120 | 63F11ED51A6F5137000FF11B /* VTDListUpcomingItemProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListUpcomingItemProvider.m; sourceTree = ""; }; 121 | 63F11ED71A6F5193000FF11B /* VTDListDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDListDataManager.h; sourceTree = ""; }; 122 | 63F11ED81A6F5193000FF11B /* VTDListDataManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListDataManager.m; sourceTree = ""; }; 123 | 63F11EDA1A6F5374000FF11B /* VTDListTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDListTests.m; sourceTree = ""; }; 124 | 63F11EDC1A6F7479000FF11B /* VTDAddInteractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddInteractor.h; sourceTree = ""; }; 125 | 63F11EDD1A6F7479000FF11B /* VTDAddInteractor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddInteractor.m; sourceTree = ""; }; 126 | 63F11EDF1A6F7484000FF11B /* VTDAddDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDAddDataManager.h; sourceTree = ""; }; 127 | 63F11EE01A6F7484000FF11B /* VTDAddDataManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDAddDataManager.m; sourceTree = ""; }; 128 | 63F11EE31A6F7C44000FF11B /* VTDTodoItemProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTDTodoItemProvider.h; sourceTree = ""; }; 129 | 63F11EE41A6F7C44000FF11B /* VTDTodoItemProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VTDTodoItemProvider.m; sourceTree = ""; }; 130 | 63F11EE71A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+VTDObjectsCollector.h"; sourceTree = ""; }; 131 | 63F11EE81A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+VTDObjectsCollector.m"; sourceTree = ""; }; 132 | 76D5A0D8E4EC4688CE2B6A6D /* Pods-objectionViperTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-objectionViperTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-objectionViperTests/Pods-objectionViperTests.debug.xcconfig"; sourceTree = ""; }; 133 | 887153EDBD665060E01D9813 /* Pods-objectionViper.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-objectionViper.debug.xcconfig"; path = "Pods/Target Support Files/Pods-objectionViper/Pods-objectionViper.debug.xcconfig"; sourceTree = ""; }; 134 | B4B73161896A31FE52E28A49 /* Pods-objectionViper.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-objectionViper.release.xcconfig"; path = "Pods/Target Support Files/Pods-objectionViper/Pods-objectionViper.release.xcconfig"; sourceTree = ""; }; 135 | E976B9CFB8D9B7DCB7F00E73 /* libPods-objectionViperTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-objectionViperTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 136 | EEB73998684FE6BAE1B4C41F /* Pods-objectionViperTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-objectionViperTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-objectionViperTests/Pods-objectionViperTests.release.xcconfig"; sourceTree = ""; }; 137 | F9BAB2911896C5873B212916 /* libPods-objectionViper.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-objectionViper.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 138 | /* End PBXFileReference section */ 139 | 140 | /* Begin PBXFrameworksBuildPhase section */ 141 | 639F78C41A6DF9D700654082 /* Frameworks */ = { 142 | isa = PBXFrameworksBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 63C5CEE91A6E058500874240 /* CoreData.framework in Frameworks */, 146 | B0E28354D1282A5B5B67338A /* libPods-objectionViper.a in Frameworks */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | 639F78DD1A6DF9D700654082 /* Frameworks */ = { 151 | isa = PBXFrameworksBuildPhase; 152 | buildActionMask = 2147483647; 153 | files = ( 154 | 9ACD9069B580729F564CFD8C /* libPods-objectionViperTests.a in Frameworks */, 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXFrameworksBuildPhase section */ 159 | 160 | /* Begin PBXGroup section */ 161 | 2E89054B8F9213CECB0DC0DB /* Frameworks */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 63C5CEE81A6E058500874240 /* CoreData.framework */, 165 | F9BAB2911896C5873B212916 /* libPods-objectionViper.a */, 166 | E976B9CFB8D9B7DCB7F00E73 /* libPods-objectionViperTests.a */, 167 | ); 168 | name = Frameworks; 169 | sourceTree = ""; 170 | }; 171 | 51CDC849A0A1708B0ECED2AA /* Pods */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 887153EDBD665060E01D9813 /* Pods-objectionViper.debug.xcconfig */, 175 | B4B73161896A31FE52E28A49 /* Pods-objectionViper.release.xcconfig */, 176 | 76D5A0D8E4EC4688CE2B6A6D /* Pods-objectionViperTests.debug.xcconfig */, 177 | EEB73998684FE6BAE1B4C41F /* Pods-objectionViperTests.release.xcconfig */, 178 | ); 179 | name = Pods; 180 | sourceTree = ""; 181 | }; 182 | 639F78BE1A6DF9D700654082 = { 183 | isa = PBXGroup; 184 | children = ( 185 | 639F78C91A6DF9D700654082 /* objectionViper */, 186 | 639F78E31A6DF9D700654082 /* objectionViperTests */, 187 | 639F78C81A6DF9D700654082 /* Products */, 188 | 51CDC849A0A1708B0ECED2AA /* Pods */, 189 | 2E89054B8F9213CECB0DC0DB /* Frameworks */, 190 | ); 191 | sourceTree = ""; 192 | }; 193 | 639F78C81A6DF9D700654082 /* Products */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 639F78C71A6DF9D700654082 /* objectionViper.app */, 197 | 639F78E01A6DF9D700654082 /* objectionViperTests.xctest */, 198 | ); 199 | name = Products; 200 | sourceTree = ""; 201 | }; 202 | 639F78C91A6DF9D700654082 /* objectionViper */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 63C5CED61A6E023900874240 /* VTDApplication */, 206 | 639F78CE1A6DF9D700654082 /* AppDelegate.h */, 207 | 639F78CF1A6DF9D700654082 /* AppDelegate.m */, 208 | 639F78D71A6DF9D700654082 /* Images.xcassets */, 209 | 639F78D91A6DF9D700654082 /* LaunchScreen.xib */, 210 | 639F78CA1A6DF9D700654082 /* Supporting Files */, 211 | ); 212 | path = objectionViper; 213 | sourceTree = ""; 214 | }; 215 | 639F78CA1A6DF9D700654082 /* Supporting Files */ = { 216 | isa = PBXGroup; 217 | children = ( 218 | 639F78CB1A6DF9D700654082 /* Info.plist */, 219 | 639F78CC1A6DF9D700654082 /* main.m */, 220 | 639F78F01A6DFA1100654082 /* VTD-Prefix.pch */, 221 | ); 222 | name = "Supporting Files"; 223 | sourceTree = ""; 224 | }; 225 | 639F78E31A6DF9D700654082 /* objectionViperTests */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 639F78E61A6DF9D800654082 /* objectionViperTests.m */, 229 | 63F11EDA1A6F5374000FF11B /* VTDListTests.m */, 230 | 639F78E41A6DF9D700654082 /* Supporting Files */, 231 | ); 232 | path = objectionViperTests; 233 | sourceTree = ""; 234 | }; 235 | 639F78E41A6DF9D700654082 /* Supporting Files */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | 639F78E51A6DF9D800654082 /* Info.plist */, 239 | ); 240 | name = "Supporting Files"; 241 | sourceTree = ""; 242 | }; 243 | 63ADC6FF1A6E0DF90048E2C7 /* List */ = { 244 | isa = PBXGroup; 245 | children = ( 246 | 63ADC7011A6E153B0048E2C7 /* Application Logic */, 247 | 63ADC7051A6E153B0048E2C7 /* User Interface */, 248 | 63ADC7091A6E153B0048E2C7 /* Module Interface */, 249 | ); 250 | path = List; 251 | sourceTree = ""; 252 | }; 253 | 63ADC7001A6E0DF90048E2C7 /* Add */ = { 254 | isa = PBXGroup; 255 | children = ( 256 | 63F11EA91A6E413B000FF11B /* Application Logic */, 257 | 63F11EAC1A6E413B000FF11B /* User Interface */, 258 | 63F11EAD1A6E413B000FF11B /* Module Interface */, 259 | ); 260 | path = Add; 261 | sourceTree = ""; 262 | }; 263 | 63ADC7011A6E153B0048E2C7 /* Application Logic */ = { 264 | isa = PBXGroup; 265 | children = ( 266 | 63F11ECD1A6F4C12000FF11B /* Interactor */, 267 | 63ADC7031A6E153B0048E2C7 /* Manager */, 268 | 63ADC7041A6E153B0048E2C7 /* Provider */, 269 | ); 270 | path = "Application Logic"; 271 | sourceTree = ""; 272 | }; 273 | 63ADC7031A6E153B0048E2C7 /* Manager */ = { 274 | isa = PBXGroup; 275 | children = ( 276 | 63F11ED71A6F5193000FF11B /* VTDListDataManager.h */, 277 | 63F11ED81A6F5193000FF11B /* VTDListDataManager.m */, 278 | ); 279 | path = Manager; 280 | sourceTree = ""; 281 | }; 282 | 63ADC7041A6E153B0048E2C7 /* Provider */ = { 283 | isa = PBXGroup; 284 | children = ( 285 | 63F11ED41A6F5137000FF11B /* VTDListUpcomingItemProvider.h */, 286 | 63F11ED51A6F5137000FF11B /* VTDListUpcomingItemProvider.m */, 287 | ); 288 | path = Provider; 289 | sourceTree = ""; 290 | }; 291 | 63ADC7051A6E153B0048E2C7 /* User Interface */ = { 292 | isa = PBXGroup; 293 | children = ( 294 | 63ADC7061A6E153B0048E2C7 /* Presenter */, 295 | 63ADC7071A6E153B0048E2C7 /* View */, 296 | 63ADC7081A6E153B0048E2C7 /* Wireframe */, 297 | ); 298 | path = "User Interface"; 299 | sourceTree = ""; 300 | }; 301 | 63ADC7061A6E153B0048E2C7 /* Presenter */ = { 302 | isa = PBXGroup; 303 | children = ( 304 | 63ADC7201A6E30E60048E2C7 /* VTDListPresenter.h */, 305 | 63ADC7211A6E30E60048E2C7 /* VTDListPresenter.m */, 306 | 63F11EA61A6E3B49000FF11B /* VTDListTableViewCellPresenter.h */, 307 | 63F11EA71A6E3B49000FF11B /* VTDListTableViewCellPresenter.m */, 308 | ); 309 | path = Presenter; 310 | sourceTree = ""; 311 | }; 312 | 63ADC7071A6E153B0048E2C7 /* View */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | 63ADC71D1A6E2D7A0048E2C7 /* VTDListViewController.h */, 316 | 63ADC71E1A6E2D7A0048E2C7 /* VTDListViewController.m */, 317 | 63F11EA11A6E3879000FF11B /* VTDListTableViewCell.h */, 318 | 63F11EA21A6E3879000FF11B /* VTDListTableViewCell.m */, 319 | ); 320 | path = View; 321 | sourceTree = ""; 322 | }; 323 | 63ADC7081A6E153B0048E2C7 /* Wireframe */ = { 324 | isa = PBXGroup; 325 | children = ( 326 | 63ADC70E1A6E23290048E2C7 /* VTDListWireFrame.h */, 327 | 63ADC70F1A6E23290048E2C7 /* VTDListWireFrame.m */, 328 | ); 329 | path = Wireframe; 330 | sourceTree = ""; 331 | }; 332 | 63ADC7091A6E153B0048E2C7 /* Module Interface */ = { 333 | isa = PBXGroup; 334 | children = ( 335 | 63ADC70A1A6E15510048E2C7 /* VTDListModule.h */, 336 | 63ADC70B1A6E15510048E2C7 /* VTDListModule.m */, 337 | 63ADC70D1A6E156B0048E2C7 /* VTDListProtocol.h */, 338 | ); 339 | path = "Module Interface"; 340 | sourceTree = ""; 341 | }; 342 | 63ADC7111A6E23F70048E2C7 /* View */ = { 343 | isa = PBXGroup; 344 | children = ( 345 | 63ADC7121A6E24040048E2C7 /* VTDWireFrame.h */, 346 | 63ADC7131A6E24040048E2C7 /* VTDWireFrame.m */, 347 | ); 348 | path = View; 349 | sourceTree = ""; 350 | }; 351 | 63ADC7151A6E25090048E2C7 /* Core */ = { 352 | isa = PBXGroup; 353 | children = ( 354 | 63ADC7161A6E251D0048E2C7 /* VTDCoreModule.h */, 355 | 63ADC7171A6E251D0048E2C7 /* VTDCoreModule.m */, 356 | 63ADC7191A6E252E0048E2C7 /* VTDCoreProtocol.h */, 357 | ); 358 | path = Core; 359 | sourceTree = ""; 360 | }; 361 | 63ADC71A1A6E28CF0048E2C7 /* Resources */ = { 362 | isa = PBXGroup; 363 | children = ( 364 | 63ADC71B1A6E28E80048E2C7 /* VTD.storyboard */, 365 | 63F11EA41A6E38C2000FF11B /* VTDListTableViewCell.xib */, 366 | ); 367 | path = Resources; 368 | sourceTree = ""; 369 | }; 370 | 63C5CED61A6E023900874240 /* VTDApplication */ = { 371 | isa = PBXGroup; 372 | children = ( 373 | 63ADC71A1A6E28CF0048E2C7 /* Resources */, 374 | 63C5CED71A6E023900874240 /* Classes */, 375 | ); 376 | path = VTDApplication; 377 | sourceTree = ""; 378 | }; 379 | 63C5CED71A6E023900874240 /* Classes */ = { 380 | isa = PBXGroup; 381 | children = ( 382 | 63C5CED81A6E023900874240 /* Common */, 383 | 63C5CED91A6E023900874240 /* Modules */, 384 | 63C5CEDA1A6E024E00874240 /* VTDApplication.h */, 385 | 63C5CEDB1A6E024E00874240 /* VTDApplication.m */, 386 | ); 387 | path = Classes; 388 | sourceTree = ""; 389 | }; 390 | 63C5CED81A6E023900874240 /* Common */ = { 391 | isa = PBXGroup; 392 | children = ( 393 | 63F11EE61A6F7D37000FF11B /* Category */, 394 | 63F11EE21A6F7C39000FF11B /* Provider */, 395 | 63F11EC61A6F4A7A000FF11B /* Model */, 396 | 63ADC7151A6E25090048E2C7 /* Core */, 397 | 63ADC7111A6E23F70048E2C7 /* View */, 398 | 63C5CEDD1A6E036B00874240 /* Store */, 399 | ); 400 | path = Common; 401 | sourceTree = ""; 402 | }; 403 | 63C5CED91A6E023900874240 /* Modules */ = { 404 | isa = PBXGroup; 405 | children = ( 406 | 63ADC6FF1A6E0DF90048E2C7 /* List */, 407 | 63ADC7001A6E0DF90048E2C7 /* Add */, 408 | ); 409 | path = Modules; 410 | sourceTree = ""; 411 | }; 412 | 63C5CEDD1A6E036B00874240 /* Store */ = { 413 | isa = PBXGroup; 414 | children = ( 415 | 63C5CEE41A6E056E00874240 /* Entities */, 416 | 63C5CEDE1A6E041800874240 /* VTDModel.xcdatamodeld */, 417 | 63C5CEEA1A6E05BD00874240 /* VTDCoreDataStore.h */, 418 | 63C5CEEB1A6E05BD00874240 /* VTDCoreDataStore.m */, 419 | ); 420 | path = Store; 421 | sourceTree = ""; 422 | }; 423 | 63C5CEE41A6E056E00874240 /* Entities */ = { 424 | isa = PBXGroup; 425 | children = ( 426 | 63C5CEE51A6E056E00874240 /* VTDManagedTodoItem.h */, 427 | 63C5CEE61A6E056E00874240 /* VTDManagedTodoItem.m */, 428 | ); 429 | path = Entities; 430 | sourceTree = ""; 431 | }; 432 | 63F11EA91A6E413B000FF11B /* Application Logic */ = { 433 | isa = PBXGroup; 434 | children = ( 435 | 63F11EAA1A6E413B000FF11B /* Interactor */, 436 | 63F11EAB1A6E413B000FF11B /* Manager */, 437 | ); 438 | path = "Application Logic"; 439 | sourceTree = ""; 440 | }; 441 | 63F11EAA1A6E413B000FF11B /* Interactor */ = { 442 | isa = PBXGroup; 443 | children = ( 444 | 63F11EDC1A6F7479000FF11B /* VTDAddInteractor.h */, 445 | 63F11EDD1A6F7479000FF11B /* VTDAddInteractor.m */, 446 | ); 447 | path = Interactor; 448 | sourceTree = ""; 449 | }; 450 | 63F11EAB1A6E413B000FF11B /* Manager */ = { 451 | isa = PBXGroup; 452 | children = ( 453 | 63F11EDF1A6F7484000FF11B /* VTDAddDataManager.h */, 454 | 63F11EE01A6F7484000FF11B /* VTDAddDataManager.m */, 455 | ); 456 | path = Manager; 457 | sourceTree = ""; 458 | }; 459 | 63F11EAC1A6E413B000FF11B /* User Interface */ = { 460 | isa = PBXGroup; 461 | children = ( 462 | 63F11EBF1A6E46DD000FF11B /* Transition */, 463 | 63F11EB21A6E41C9000FF11B /* Wireframe */, 464 | 63F11EB31A6E41C9000FF11B /* Presenter */, 465 | 63F11EB41A6E41C9000FF11B /* View */, 466 | ); 467 | path = "User Interface"; 468 | sourceTree = ""; 469 | }; 470 | 63F11EAD1A6E413B000FF11B /* Module Interface */ = { 471 | isa = PBXGroup; 472 | children = ( 473 | 63F11EAE1A6E4160000FF11B /* VTDAddModule.h */, 474 | 63F11EAF1A6E4160000FF11B /* VTDAddModule.m */, 475 | 63F11EB11A6E416C000FF11B /* VTDAddProtocol.h */, 476 | ); 477 | path = "Module Interface"; 478 | sourceTree = ""; 479 | }; 480 | 63F11EB21A6E41C9000FF11B /* Wireframe */ = { 481 | isa = PBXGroup; 482 | children = ( 483 | 63F11EB51A6E420F000FF11B /* VTDAddWireFrame.h */, 484 | 63F11EB61A6E420F000FF11B /* VTDAddWireFrame.m */, 485 | ); 486 | path = Wireframe; 487 | sourceTree = ""; 488 | }; 489 | 63F11EB31A6E41C9000FF11B /* Presenter */ = { 490 | isa = PBXGroup; 491 | children = ( 492 | 63F11EBB1A6E42AE000FF11B /* VTDAddPresenter.h */, 493 | 63F11EBC1A6E42AE000FF11B /* VTDAddPresenter.m */, 494 | ); 495 | path = Presenter; 496 | sourceTree = ""; 497 | }; 498 | 63F11EB41A6E41C9000FF11B /* View */ = { 499 | isa = PBXGroup; 500 | children = ( 501 | 63F11EB81A6E4296000FF11B /* VTDAddViewController.h */, 502 | 63F11EB91A6E4296000FF11B /* VTDAddViewController.m */, 503 | ); 504 | path = View; 505 | sourceTree = ""; 506 | }; 507 | 63F11EBF1A6E46DD000FF11B /* Transition */ = { 508 | isa = PBXGroup; 509 | children = ( 510 | 63F11EC01A6E470F000FF11B /* VTDAddPresentationTransition.h */, 511 | 63F11EC11A6E470F000FF11B /* VTDAddPresentationTransition.m */, 512 | 63F11EC31A6E5E51000FF11B /* VTDAddDismissTransition.h */, 513 | 63F11EC41A6E5E51000FF11B /* VTDAddDismissTransition.m */, 514 | ); 515 | path = Transition; 516 | sourceTree = ""; 517 | }; 518 | 63F11EC61A6F4A7A000FF11B /* Model */ = { 519 | isa = PBXGroup; 520 | children = ( 521 | 63F11EC71A6F4A8A000FF11B /* VTDTodoItem.h */, 522 | 63F11EC81A6F4A8A000FF11B /* VTDTodoItem.m */, 523 | ); 524 | path = Model; 525 | sourceTree = ""; 526 | }; 527 | 63F11ECD1A6F4C12000FF11B /* Interactor */ = { 528 | isa = PBXGroup; 529 | children = ( 530 | 63F11ECE1A6F4C28000FF11B /* VTDListUpcomingItem.h */, 531 | 63F11ECF1A6F4C28000FF11B /* VTDListUpcomingItem.m */, 532 | 63F11ED11A6F4C3B000FF11B /* VTDListInteractor.h */, 533 | 63F11ED21A6F4C3B000FF11B /* VTDListInteractor.m */, 534 | ); 535 | path = Interactor; 536 | sourceTree = ""; 537 | }; 538 | 63F11EE21A6F7C39000FF11B /* Provider */ = { 539 | isa = PBXGroup; 540 | children = ( 541 | 63F11EE31A6F7C44000FF11B /* VTDTodoItemProvider.h */, 542 | 63F11EE41A6F7C44000FF11B /* VTDTodoItemProvider.m */, 543 | ); 544 | path = Provider; 545 | sourceTree = ""; 546 | }; 547 | 63F11EE61A6F7D37000FF11B /* Category */ = { 548 | isa = PBXGroup; 549 | children = ( 550 | 63F11EE71A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.h */, 551 | 63F11EE81A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.m */, 552 | ); 553 | path = Category; 554 | sourceTree = ""; 555 | }; 556 | /* End PBXGroup section */ 557 | 558 | /* Begin PBXNativeTarget section */ 559 | 639F78C61A6DF9D700654082 /* objectionViper */ = { 560 | isa = PBXNativeTarget; 561 | buildConfigurationList = 639F78EA1A6DF9D800654082 /* Build configuration list for PBXNativeTarget "objectionViper" */; 562 | buildPhases = ( 563 | 366958BD0F07BB2163295B6A /* Check Pods Manifest.lock */, 564 | 639F78C31A6DF9D700654082 /* Sources */, 565 | 639F78C41A6DF9D700654082 /* Frameworks */, 566 | 639F78C51A6DF9D700654082 /* Resources */, 567 | 1832B73941DD5AAF20970B17 /* Copy Pods Resources */, 568 | ); 569 | buildRules = ( 570 | ); 571 | dependencies = ( 572 | ); 573 | name = objectionViper; 574 | productName = objectionViper; 575 | productReference = 639F78C71A6DF9D700654082 /* objectionViper.app */; 576 | productType = "com.apple.product-type.application"; 577 | }; 578 | 639F78DF1A6DF9D700654082 /* objectionViperTests */ = { 579 | isa = PBXNativeTarget; 580 | buildConfigurationList = 639F78ED1A6DF9D800654082 /* Build configuration list for PBXNativeTarget "objectionViperTests" */; 581 | buildPhases = ( 582 | 23DB4FB31E40279C3A2AEBFE /* Check Pods Manifest.lock */, 583 | 639F78DC1A6DF9D700654082 /* Sources */, 584 | 639F78DD1A6DF9D700654082 /* Frameworks */, 585 | 639F78DE1A6DF9D700654082 /* Resources */, 586 | F2EA872260FE9FA74207C2F1 /* Copy Pods Resources */, 587 | ); 588 | buildRules = ( 589 | ); 590 | dependencies = ( 591 | 639F78E21A6DF9D700654082 /* PBXTargetDependency */, 592 | ); 593 | name = objectionViperTests; 594 | productName = objectionViperTests; 595 | productReference = 639F78E01A6DF9D700654082 /* objectionViperTests.xctest */; 596 | productType = "com.apple.product-type.bundle.unit-test"; 597 | }; 598 | /* End PBXNativeTarget section */ 599 | 600 | /* Begin PBXProject section */ 601 | 639F78BF1A6DF9D700654082 /* Project object */ = { 602 | isa = PBXProject; 603 | attributes = { 604 | CLASSPREFIX = VTD; 605 | LastUpgradeCheck = 0610; 606 | ORGANIZATIONNAME = "多玩事业部 iOS开发组 YY Inc."; 607 | TargetAttributes = { 608 | 639F78C61A6DF9D700654082 = { 609 | CreatedOnToolsVersion = 6.1.1; 610 | }; 611 | 639F78DF1A6DF9D700654082 = { 612 | CreatedOnToolsVersion = 6.1.1; 613 | TestTargetID = 639F78C61A6DF9D700654082; 614 | }; 615 | }; 616 | }; 617 | buildConfigurationList = 639F78C21A6DF9D700654082 /* Build configuration list for PBXProject "objectionViper" */; 618 | compatibilityVersion = "Xcode 3.2"; 619 | developmentRegion = English; 620 | hasScannedForEncodings = 0; 621 | knownRegions = ( 622 | en, 623 | Base, 624 | ); 625 | mainGroup = 639F78BE1A6DF9D700654082; 626 | productRefGroup = 639F78C81A6DF9D700654082 /* Products */; 627 | projectDirPath = ""; 628 | projectRoot = ""; 629 | targets = ( 630 | 639F78C61A6DF9D700654082 /* objectionViper */, 631 | 639F78DF1A6DF9D700654082 /* objectionViperTests */, 632 | ); 633 | }; 634 | /* End PBXProject section */ 635 | 636 | /* Begin PBXResourcesBuildPhase section */ 637 | 639F78C51A6DF9D700654082 /* Resources */ = { 638 | isa = PBXResourcesBuildPhase; 639 | buildActionMask = 2147483647; 640 | files = ( 641 | 639F78DB1A6DF9D700654082 /* LaunchScreen.xib in Resources */, 642 | 639F78D81A6DF9D700654082 /* Images.xcassets in Resources */, 643 | 63F11EA51A6E38C2000FF11B /* VTDListTableViewCell.xib in Resources */, 644 | 63ADC71C1A6E28E80048E2C7 /* VTD.storyboard in Resources */, 645 | ); 646 | runOnlyForDeploymentPostprocessing = 0; 647 | }; 648 | 639F78DE1A6DF9D700654082 /* Resources */ = { 649 | isa = PBXResourcesBuildPhase; 650 | buildActionMask = 2147483647; 651 | files = ( 652 | ); 653 | runOnlyForDeploymentPostprocessing = 0; 654 | }; 655 | /* End PBXResourcesBuildPhase section */ 656 | 657 | /* Begin PBXShellScriptBuildPhase section */ 658 | 1832B73941DD5AAF20970B17 /* Copy Pods Resources */ = { 659 | isa = PBXShellScriptBuildPhase; 660 | buildActionMask = 2147483647; 661 | files = ( 662 | ); 663 | inputPaths = ( 664 | ); 665 | name = "Copy Pods Resources"; 666 | outputPaths = ( 667 | ); 668 | runOnlyForDeploymentPostprocessing = 0; 669 | shellPath = /bin/sh; 670 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-objectionViper/Pods-objectionViper-resources.sh\"\n"; 671 | showEnvVarsInLog = 0; 672 | }; 673 | 23DB4FB31E40279C3A2AEBFE /* Check Pods Manifest.lock */ = { 674 | isa = PBXShellScriptBuildPhase; 675 | buildActionMask = 2147483647; 676 | files = ( 677 | ); 678 | inputPaths = ( 679 | ); 680 | name = "Check Pods Manifest.lock"; 681 | outputPaths = ( 682 | ); 683 | runOnlyForDeploymentPostprocessing = 0; 684 | shellPath = /bin/sh; 685 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 686 | showEnvVarsInLog = 0; 687 | }; 688 | 366958BD0F07BB2163295B6A /* Check Pods Manifest.lock */ = { 689 | isa = PBXShellScriptBuildPhase; 690 | buildActionMask = 2147483647; 691 | files = ( 692 | ); 693 | inputPaths = ( 694 | ); 695 | name = "Check Pods Manifest.lock"; 696 | outputPaths = ( 697 | ); 698 | runOnlyForDeploymentPostprocessing = 0; 699 | shellPath = /bin/sh; 700 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 701 | showEnvVarsInLog = 0; 702 | }; 703 | F2EA872260FE9FA74207C2F1 /* Copy Pods Resources */ = { 704 | isa = PBXShellScriptBuildPhase; 705 | buildActionMask = 2147483647; 706 | files = ( 707 | ); 708 | inputPaths = ( 709 | ); 710 | name = "Copy Pods Resources"; 711 | outputPaths = ( 712 | ); 713 | runOnlyForDeploymentPostprocessing = 0; 714 | shellPath = /bin/sh; 715 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-objectionViperTests/Pods-objectionViperTests-resources.sh\"\n"; 716 | showEnvVarsInLog = 0; 717 | }; 718 | /* End PBXShellScriptBuildPhase section */ 719 | 720 | /* Begin PBXSourcesBuildPhase section */ 721 | 639F78C31A6DF9D700654082 /* Sources */ = { 722 | isa = PBXSourcesBuildPhase; 723 | buildActionMask = 2147483647; 724 | files = ( 725 | 63F11EA31A6E3879000FF11B /* VTDListTableViewCell.m in Sources */, 726 | 63F11EDE1A6F7479000FF11B /* VTDAddInteractor.m in Sources */, 727 | 63F11EC91A6F4A8A000FF11B /* VTDTodoItem.m in Sources */, 728 | 63F11EBD1A6E42AE000FF11B /* VTDAddPresenter.m in Sources */, 729 | 63F11EC51A6E5E51000FF11B /* VTDAddDismissTransition.m in Sources */, 730 | 63F11EA81A6E3B49000FF11B /* VTDListTableViewCellPresenter.m in Sources */, 731 | 63C5CEE01A6E041800874240 /* VTDModel.xcdatamodeld in Sources */, 732 | 63F11ED61A6F5137000FF11B /* VTDListUpcomingItemProvider.m in Sources */, 733 | 63ADC7101A6E23290048E2C7 /* VTDListWireFrame.m in Sources */, 734 | 63F11EB01A6E4160000FF11B /* VTDAddModule.m in Sources */, 735 | 63F11EE51A6F7C44000FF11B /* VTDTodoItemProvider.m in Sources */, 736 | 63F11EB71A6E420F000FF11B /* VTDAddWireFrame.m in Sources */, 737 | 63F11EE11A6F7484000FF11B /* VTDAddDataManager.m in Sources */, 738 | 63F11EE91A6F7D9A000FF11B /* NSArray+VTDObjectsCollector.m in Sources */, 739 | 63F11EC21A6E470F000FF11B /* VTDAddPresentationTransition.m in Sources */, 740 | 63F11ED31A6F4C3B000FF11B /* VTDListInteractor.m in Sources */, 741 | 63F11ED91A6F5193000FF11B /* VTDListDataManager.m in Sources */, 742 | 63ADC70C1A6E15510048E2C7 /* VTDListModule.m in Sources */, 743 | 63ADC7221A6E30E60048E2C7 /* VTDListPresenter.m in Sources */, 744 | 63F11EBA1A6E4296000FF11B /* VTDAddViewController.m in Sources */, 745 | 63C5CEDC1A6E024E00874240 /* VTDApplication.m in Sources */, 746 | 63ADC7181A6E251D0048E2C7 /* VTDCoreModule.m in Sources */, 747 | 63F11ED01A6F4C28000FF11B /* VTDListUpcomingItem.m in Sources */, 748 | 639F78D01A6DF9D700654082 /* AppDelegate.m in Sources */, 749 | 63C5CEE71A6E056E00874240 /* VTDManagedTodoItem.m in Sources */, 750 | 63ADC7141A6E24040048E2C7 /* VTDWireFrame.m in Sources */, 751 | 63C5CEEC1A6E05BD00874240 /* VTDCoreDataStore.m in Sources */, 752 | 639F78CD1A6DF9D700654082 /* main.m in Sources */, 753 | 63ADC71F1A6E2D7A0048E2C7 /* VTDListViewController.m in Sources */, 754 | ); 755 | runOnlyForDeploymentPostprocessing = 0; 756 | }; 757 | 639F78DC1A6DF9D700654082 /* Sources */ = { 758 | isa = PBXSourcesBuildPhase; 759 | buildActionMask = 2147483647; 760 | files = ( 761 | 63F11EDB1A6F5374000FF11B /* VTDListTests.m in Sources */, 762 | 639F78E71A6DF9D800654082 /* objectionViperTests.m in Sources */, 763 | ); 764 | runOnlyForDeploymentPostprocessing = 0; 765 | }; 766 | /* End PBXSourcesBuildPhase section */ 767 | 768 | /* Begin PBXTargetDependency section */ 769 | 639F78E21A6DF9D700654082 /* PBXTargetDependency */ = { 770 | isa = PBXTargetDependency; 771 | target = 639F78C61A6DF9D700654082 /* objectionViper */; 772 | targetProxy = 639F78E11A6DF9D700654082 /* PBXContainerItemProxy */; 773 | }; 774 | /* End PBXTargetDependency section */ 775 | 776 | /* Begin PBXVariantGroup section */ 777 | 639F78D91A6DF9D700654082 /* LaunchScreen.xib */ = { 778 | isa = PBXVariantGroup; 779 | children = ( 780 | 639F78DA1A6DF9D700654082 /* Base */, 781 | ); 782 | name = LaunchScreen.xib; 783 | sourceTree = ""; 784 | }; 785 | /* End PBXVariantGroup section */ 786 | 787 | /* Begin XCBuildConfiguration section */ 788 | 639F78E81A6DF9D800654082 /* Debug */ = { 789 | isa = XCBuildConfiguration; 790 | buildSettings = { 791 | ALWAYS_SEARCH_USER_PATHS = NO; 792 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 793 | CLANG_CXX_LIBRARY = "libc++"; 794 | CLANG_ENABLE_MODULES = YES; 795 | CLANG_ENABLE_OBJC_ARC = YES; 796 | CLANG_WARN_BOOL_CONVERSION = YES; 797 | CLANG_WARN_CONSTANT_CONVERSION = YES; 798 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 799 | CLANG_WARN_EMPTY_BODY = YES; 800 | CLANG_WARN_ENUM_CONVERSION = YES; 801 | CLANG_WARN_INT_CONVERSION = YES; 802 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 803 | CLANG_WARN_UNREACHABLE_CODE = YES; 804 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 805 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 806 | COPY_PHASE_STRIP = NO; 807 | ENABLE_STRICT_OBJC_MSGSEND = YES; 808 | GCC_C_LANGUAGE_STANDARD = gnu99; 809 | GCC_DYNAMIC_NO_PIC = NO; 810 | GCC_OPTIMIZATION_LEVEL = 0; 811 | GCC_PREPROCESSOR_DEFINITIONS = ( 812 | "DEBUG=1", 813 | "$(inherited)", 814 | ); 815 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 816 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 817 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 818 | GCC_WARN_UNDECLARED_SELECTOR = YES; 819 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 820 | GCC_WARN_UNUSED_FUNCTION = YES; 821 | GCC_WARN_UNUSED_VARIABLE = YES; 822 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 823 | MTL_ENABLE_DEBUG_INFO = YES; 824 | ONLY_ACTIVE_ARCH = YES; 825 | SDKROOT = iphoneos; 826 | }; 827 | name = Debug; 828 | }; 829 | 639F78E91A6DF9D800654082 /* Release */ = { 830 | isa = XCBuildConfiguration; 831 | buildSettings = { 832 | ALWAYS_SEARCH_USER_PATHS = NO; 833 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 834 | CLANG_CXX_LIBRARY = "libc++"; 835 | CLANG_ENABLE_MODULES = YES; 836 | CLANG_ENABLE_OBJC_ARC = YES; 837 | CLANG_WARN_BOOL_CONVERSION = YES; 838 | CLANG_WARN_CONSTANT_CONVERSION = YES; 839 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 840 | CLANG_WARN_EMPTY_BODY = YES; 841 | CLANG_WARN_ENUM_CONVERSION = YES; 842 | CLANG_WARN_INT_CONVERSION = YES; 843 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 844 | CLANG_WARN_UNREACHABLE_CODE = YES; 845 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 846 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 847 | COPY_PHASE_STRIP = YES; 848 | ENABLE_NS_ASSERTIONS = NO; 849 | ENABLE_STRICT_OBJC_MSGSEND = YES; 850 | GCC_C_LANGUAGE_STANDARD = gnu99; 851 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 852 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 853 | GCC_WARN_UNDECLARED_SELECTOR = YES; 854 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 855 | GCC_WARN_UNUSED_FUNCTION = YES; 856 | GCC_WARN_UNUSED_VARIABLE = YES; 857 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 858 | MTL_ENABLE_DEBUG_INFO = NO; 859 | SDKROOT = iphoneos; 860 | VALIDATE_PRODUCT = YES; 861 | }; 862 | name = Release; 863 | }; 864 | 639F78EB1A6DF9D800654082 /* Debug */ = { 865 | isa = XCBuildConfiguration; 866 | baseConfigurationReference = 887153EDBD665060E01D9813 /* Pods-objectionViper.debug.xcconfig */; 867 | buildSettings = { 868 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 869 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 870 | GCC_PREFIX_HEADER = "objectionViper/VTD-Prefix.pch"; 871 | INFOPLIST_FILE = objectionViper/Info.plist; 872 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 873 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 874 | PRODUCT_NAME = "$(TARGET_NAME)"; 875 | }; 876 | name = Debug; 877 | }; 878 | 639F78EC1A6DF9D800654082 /* Release */ = { 879 | isa = XCBuildConfiguration; 880 | baseConfigurationReference = B4B73161896A31FE52E28A49 /* Pods-objectionViper.release.xcconfig */; 881 | buildSettings = { 882 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 883 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 884 | GCC_PREFIX_HEADER = "objectionViper/VTD-Prefix.pch"; 885 | INFOPLIST_FILE = objectionViper/Info.plist; 886 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 887 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 888 | PRODUCT_NAME = "$(TARGET_NAME)"; 889 | }; 890 | name = Release; 891 | }; 892 | 639F78EE1A6DF9D800654082 /* Debug */ = { 893 | isa = XCBuildConfiguration; 894 | baseConfigurationReference = 76D5A0D8E4EC4688CE2B6A6D /* Pods-objectionViperTests.debug.xcconfig */; 895 | buildSettings = { 896 | BUNDLE_LOADER = "$(TEST_HOST)"; 897 | FRAMEWORK_SEARCH_PATHS = ( 898 | "$(SDKROOT)/Developer/Library/Frameworks", 899 | "$(inherited)", 900 | ); 901 | GCC_PREPROCESSOR_DEFINITIONS = ( 902 | "DEBUG=1", 903 | "$(inherited)", 904 | ); 905 | INFOPLIST_FILE = objectionViperTests/Info.plist; 906 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 907 | PRODUCT_NAME = "$(TARGET_NAME)"; 908 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/objectionViper.app/objectionViper"; 909 | }; 910 | name = Debug; 911 | }; 912 | 639F78EF1A6DF9D800654082 /* Release */ = { 913 | isa = XCBuildConfiguration; 914 | baseConfigurationReference = EEB73998684FE6BAE1B4C41F /* Pods-objectionViperTests.release.xcconfig */; 915 | buildSettings = { 916 | BUNDLE_LOADER = "$(TEST_HOST)"; 917 | FRAMEWORK_SEARCH_PATHS = ( 918 | "$(SDKROOT)/Developer/Library/Frameworks", 919 | "$(inherited)", 920 | ); 921 | INFOPLIST_FILE = objectionViperTests/Info.plist; 922 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 923 | PRODUCT_NAME = "$(TARGET_NAME)"; 924 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/objectionViper.app/objectionViper"; 925 | }; 926 | name = Release; 927 | }; 928 | /* End XCBuildConfiguration section */ 929 | 930 | /* Begin XCConfigurationList section */ 931 | 639F78C21A6DF9D700654082 /* Build configuration list for PBXProject "objectionViper" */ = { 932 | isa = XCConfigurationList; 933 | buildConfigurations = ( 934 | 639F78E81A6DF9D800654082 /* Debug */, 935 | 639F78E91A6DF9D800654082 /* Release */, 936 | ); 937 | defaultConfigurationIsVisible = 0; 938 | defaultConfigurationName = Release; 939 | }; 940 | 639F78EA1A6DF9D800654082 /* Build configuration list for PBXNativeTarget "objectionViper" */ = { 941 | isa = XCConfigurationList; 942 | buildConfigurations = ( 943 | 639F78EB1A6DF9D800654082 /* Debug */, 944 | 639F78EC1A6DF9D800654082 /* Release */, 945 | ); 946 | defaultConfigurationIsVisible = 0; 947 | defaultConfigurationName = Release; 948 | }; 949 | 639F78ED1A6DF9D800654082 /* Build configuration list for PBXNativeTarget "objectionViperTests" */ = { 950 | isa = XCConfigurationList; 951 | buildConfigurations = ( 952 | 639F78EE1A6DF9D800654082 /* Debug */, 953 | 639F78EF1A6DF9D800654082 /* Release */, 954 | ); 955 | defaultConfigurationIsVisible = 0; 956 | defaultConfigurationName = Release; 957 | }; 958 | /* End XCConfigurationList section */ 959 | 960 | /* Begin XCVersionGroup section */ 961 | 63C5CEDE1A6E041800874240 /* VTDModel.xcdatamodeld */ = { 962 | isa = XCVersionGroup; 963 | children = ( 964 | 63C5CEDF1A6E041800874240 /* VTDModel.xcdatamodel */, 965 | ); 966 | currentVersion = 63C5CEDF1A6E041800874240 /* VTDModel.xcdatamodel */; 967 | path = VTDModel.xcdatamodeld; 968 | sourceTree = ""; 969 | versionGroupType = wrapper.xcdatamodel; 970 | }; 971 | /* End XCVersionGroup section */ 972 | }; 973 | rootObject = 639F78BF1A6DF9D700654082 /* Project object */; 974 | } 975 | -------------------------------------------------------------------------------- /objectionViper.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /objectionViper.xcodeproj/xcuserdata/saiakirahui.xcuserdatad/xcschemes/objectionViper.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /objectionViper.xcodeproj/xcuserdata/saiakirahui.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | objectionViper.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 639F78C61A6DF9D700654082 16 | 17 | primary 18 | 19 | 20 | 639F78DF1A6DF9D700654082 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /objectionViper/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /objectionViper/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | [application setStatusBarStyle:UIStatusBarStyleLightContent]; 21 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 22 | [VTD[@protocol(VTDListWireFrame)] presentListViewControllerToWindow:self.window]; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application { 28 | // 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. 29 | // 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. 30 | } 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // 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. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | - (void)applicationWillTerminate:(UIApplication *)application { 46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /objectionViper/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /objectionViper/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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /objectionViper/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.duowan.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /objectionViper/VTD-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // VTD-Prefix.pch 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #ifdef __OBJC__ 10 | #import 11 | #import 12 | #import "VTDApplication.h" 13 | #endif 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Category/NSArray+VTDObjectsCollector.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+VTDObjectsCollection.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (VTDObjectCollector) 12 | 13 | - (void)VTD_collectArrayAsObject:(id)object completionBlock:(void (^)(NSArray *collectedArray))completionBlock; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Category/NSArray+VTDObjectsCollector.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+VTDObjectsCollection.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "NSArray+VTDObjectsCollector.h" 10 | 11 | @implementation NSArray (VTDObjectCollector) 12 | 13 | - (void)VTD_collectArrayAsObject:(id)object completionBlock:(void (^)(NSArray *))completionBlock { 14 | __block NSMutableArray *collectedArray = [NSMutableArray array]; 15 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 16 | id collectedObject = [VTD getObject:object argumentList:@[obj]]; 17 | if (collectedObject != nil) { 18 | [collectedArray addObject:collectedObject]; 19 | } 20 | }]; 21 | if (completionBlock) { 22 | completionBlock([collectedArray copy]); 23 | } 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Core/VTDCoreModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDCoreModule.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "JSObjectionModule.h" 10 | 11 | @interface VTDCoreModule : JSObjectionModule 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Core/VTDCoreModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDCoreModule.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDCoreModule.h" 10 | #import "VTDWireFrame.h" 11 | #import "VTDCoreDataStore.h" 12 | #import "VTDTodoItem.h" 13 | #import "VTDTodoItemProvider.h" 14 | 15 | @implementation VTDCoreModule 16 | 17 | - (void)configure { 18 | //singleton define 19 | [self bindClass:[VTDWireFrame class] inScope:JSObjectionScopeSingleton]; 20 | [self bindClass:[VTDCoreDataStore class] inScope:JSObjectionScopeSingleton]; 21 | //bind class 22 | [self bindClass:[VTDWireFrame class] toProtocol:@protocol(VTDWireFrame)]; 23 | [self bindClass:[VTDCoreDataStore class] toProtocol:@protocol(VTDCoreDataStore)]; 24 | //bind provider 25 | [self bindProvider:[[VTDTodoItemProvider alloc] init] toClass:[VTDTodoItem class]]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Core/VTDCoreProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDCoreProtocol.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void(^VTDCoreDataStoreFetchCompletionBlock)(NSArray *results); 12 | typedef void(^VTDCoreDataStoreCommitCompletionBlock)(); 13 | typedef void(^VTDCoreDataStoreCommitFailureBlock)(); 14 | 15 | @class VTDManagedTodoItem; 16 | 17 | @protocol VTDWireFrame 18 | 19 | @end 20 | 21 | @protocol VTDCoreDataStore 22 | 23 | - (void)fetchEntriesWithEntryName:(NSString *)entryName 24 | predicate:(NSPredicate *)predicate 25 | sortDescriptors:(NSArray *)sortDescriptors 26 | completionBlock:(VTDCoreDataStoreFetchCompletionBlock)completionBlock; 27 | 28 | - (VTDManagedTodoItem *)newTodoItem; 29 | 30 | - (void)saveWithCompletionBlock:(VTDCoreDataStoreCommitCompletionBlock)completionBlock 31 | failureBlock:(VTDCoreDataStoreCommitFailureBlock)failureBlock; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Model/VTDTodoItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDTodoItem.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDTodoItem : NSObject 12 | 13 | @property (nonatomic, strong) NSString *name; 14 | @property (nonatomic, strong) NSDate *date; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Model/VTDTodoItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDTodoItem.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDTodoItem.h" 10 | 11 | @implementation VTDTodoItem 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Provider/VTDTodoItemProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDTodoItemProvider.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDTodoItemProvider : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Provider/VTDTodoItemProvider.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDTodoItemProvider.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDTodoItemProvider.h" 10 | #import "VTDTodoItem.h" 11 | #import "VTDManagedTodoItem.h" 12 | 13 | @implementation VTDTodoItemProvider 14 | 15 | - (id)provide:(JSObjectionInjector *)context arguments:(NSArray *)arguments { 16 | if ([arguments count] >= 1) { 17 | if ([[arguments firstObject] isKindOfClass:[VTDManagedTodoItem class]]) { 18 | VTDManagedTodoItem *managedItem = [arguments firstObject]; 19 | VTDTodoItem *modelItem = [[VTDTodoItem alloc] init]; 20 | modelItem.name = managedItem.name; 21 | modelItem.date = managedItem.date; 22 | return modelItem; 23 | } 24 | } 25 | return nil; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Store/Entities/VTDManagedTodoItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // TodoItem.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface VTDManagedTodoItem : NSManagedObject 14 | 15 | @property (nonatomic, retain) NSDate * date; 16 | @property (nonatomic, retain) NSString * name; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Store/Entities/VTDManagedTodoItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // TodoItem.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDManagedTodoItem.h" 10 | 11 | 12 | @implementation VTDManagedTodoItem 13 | 14 | @dynamic date; 15 | @dynamic name; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Store/VTDCoreDataStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDCoreDataStore.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import "VTDManagedTodoItem.h" 13 | 14 | typedef void(^VTDCoreDataStoreFetchCompletionBlock)(NSArray *results); 15 | typedef void(^VTDCoreDataStoreCommitCompletionBlock)(); 16 | typedef void(^VTDCoreDataStoreCommitFailureBlock)(); 17 | 18 | @interface VTDCoreDataStore : NSObject 19 | 20 | - (void)fetchEntriesWithEntryName:(NSString *)entryName 21 | predicate:(NSPredicate *)predicate 22 | sortDescriptors:(NSArray *)sortDescriptors 23 | completionBlock:(VTDCoreDataStoreFetchCompletionBlock)completionBlock; 24 | 25 | - (VTDManagedTodoItem *)newTodoItem; 26 | 27 | - (void)saveWithCompletionBlock:(VTDCoreDataStoreCommitCompletionBlock)completionBlock 28 | failureBlock:(VTDCoreDataStoreCommitFailureBlock)failureBlock; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Store/VTDCoreDataStore.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDCoreDataStore.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDCoreDataStore.h" 10 | 11 | @interface VTDCoreDataStore () 12 | 13 | @property (nonatomic, strong) NSPersistentStoreCoordinator *persistentStoreCoordinator; 14 | @property (nonatomic, strong) NSManagedObjectModel *managedObjectModel; 15 | @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext; 16 | 17 | @end 18 | 19 | @implementation VTDCoreDataStore 20 | 21 | - (instancetype)init { 22 | self = [super init]; 23 | if (self) { 24 | self.managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; 25 | self.persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] 26 | initWithManagedObjectModel:self.managedObjectModel]; 27 | NSError *error = nil; 28 | NSURL *applicationDocumentsDirectory = [[[NSFileManager defaultManager] 29 | URLsForDirectory:NSDocumentDirectory 30 | inDomains:NSUserDomainMask] lastObject]; 31 | NSDictionary *options = @{NSMigratePersistentStoresAutomaticallyOption: @(YES), 32 | NSInferMappingModelAutomaticallyOption: @(YES)}; 33 | NSURL *storeURL = [applicationDocumentsDirectory URLByAppendingPathComponent:@"VIPER-TODO.sqlite"]; 34 | [self.persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType 35 | configuration:nil 36 | URL:storeURL 37 | options:options 38 | error:&error]; 39 | self.managedObjectContext = [[NSManagedObjectContext alloc] 40 | initWithConcurrencyType:NSMainQueueConcurrencyType]; 41 | self.managedObjectContext.persistentStoreCoordinator = self.persistentStoreCoordinator; 42 | self.managedObjectContext.undoManager = nil; 43 | } 44 | return self; 45 | } 46 | 47 | - (void)fetchEntriesWithEntryName:(NSString *)entryName 48 | predicate:(NSPredicate *)predicate 49 | sortDescriptors:(NSArray *)sortDescriptors 50 | completionBlock:(VTDCoreDataStoreFetchCompletionBlock)completionBlock { 51 | NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:entryName]; 52 | request.predicate = predicate; 53 | request.sortDescriptors = sortDescriptors; 54 | [self.managedObjectContext performBlock:^{ 55 | NSArray *results = [self.managedObjectContext executeFetchRequest:request error:NULL]; 56 | if (completionBlock) { 57 | completionBlock(results); 58 | } 59 | }]; 60 | } 61 | 62 | - (VTDManagedTodoItem *)newTodoItem { 63 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"TodoItem" 64 | inManagedObjectContext:self.managedObjectContext]; 65 | VTDManagedTodoItem *newEntry = [(VTDManagedTodoItem *)[NSManagedObject alloc] 66 | initWithEntity:entityDescription 67 | insertIntoManagedObjectContext:self.managedObjectContext]; 68 | return newEntry; 69 | } 70 | 71 | - (void)saveWithCompletionBlock:(VTDCoreDataStoreCommitCompletionBlock)completionBlock 72 | failureBlock:(VTDCoreDataStoreCommitFailureBlock)failureBlock { 73 | NSError *error = nil; 74 | [self.managedObjectContext save:&error]; 75 | if (error == nil) { 76 | if (completionBlock) { 77 | completionBlock(); 78 | } 79 | } 80 | else { 81 | if (failureBlock) { 82 | failureBlock(); 83 | } 84 | } 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/Store/VTDModel.xcdatamodeld/VTDModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/View/VTDWireFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDWireFrame.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDWireFrame : NSObject 12 | 13 | - (void)presentRootViewControllerToWindow:(UIWindow *)window viewControllers:(NSArray *)viewControllers; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Common/View/VTDWireFrame.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDWireFrame.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDWireFrame.h" 10 | 11 | @implementation VTDWireFrame 12 | 13 | - (void)presentRootViewControllerToWindow:(UIWindow *)window viewControllers:(NSArray *)viewControllers { 14 | UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"VTD" bundle:[NSBundle mainBundle]]; 15 | UINavigationController *navigationController = [storyBoard instantiateInitialViewController]; 16 | [navigationController setViewControllers:viewControllers animated:NO]; 17 | [window setRootViewController:navigationController]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Application Logic/Interactor/VTDAddInteractor.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddInteractor.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDAddDataManager.h" 11 | 12 | @interface VTDAddInteractor : NSObject 13 | 14 | @property (nonatomic, strong) VTDAddDataManager *dataManager; 15 | 16 | - (void)saveNewEntryWithName:(NSString *)name dueDate:(NSDate *)dueDate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Application Logic/Interactor/VTDAddInteractor.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddInteractor.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddInteractor.h" 10 | #import "VTDAddDataManager.h" 11 | #import "VTDTodoItem.h" 12 | 13 | @implementation VTDAddInteractor 14 | 15 | - (instancetype)init { 16 | self = [super init]; 17 | if (self) { 18 | self.dataManager = [[VTDAddDataManager alloc] init]; 19 | } 20 | return self; 21 | } 22 | 23 | - (void)saveNewEntryWithName:(NSString *)name dueDate:(NSDate *)dueDate { 24 | if (name.length) { 25 | VTDTodoItem *newEntry = [[VTDTodoItem alloc] init]; 26 | newEntry.name = name; 27 | newEntry.date = dueDate; 28 | [self.dataManager addNewEntry:newEntry]; 29 | } 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Application Logic/Manager/VTDAddDataManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddDataManager.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDTodoItem.h" 11 | 12 | @interface VTDAddDataManager : NSObject 13 | 14 | - (void)addNewEntry:(VTDTodoItem *)todoItem; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Application Logic/Manager/VTDAddDataManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddDataManager.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddDataManager.h" 10 | #import "VTDManagedTodoItem.h" 11 | 12 | @implementation VTDAddDataManager 13 | 14 | - (void)addNewEntry:(VTDTodoItem *)todoItem { 15 | VTDManagedTodoItem *newEntry = [VTD[@protocol(VTDCoreDataStore)] newTodoItem]; 16 | newEntry.name = todoItem.name; 17 | newEntry.date = todoItem.date; 18 | 19 | [VTD[@protocol(VTDCoreDataStore)] saveWithCompletionBlock:nil failureBlock:nil]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Module Interface/VTDAddModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddModule.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "JSObjectionModule.h" 10 | 11 | @interface VTDAddModule : JSObjectionModule 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Module Interface/VTDAddModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddModule.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddModule.h" 10 | #import "VTDAddWireFrame.h" 11 | 12 | @implementation VTDAddModule 13 | 14 | - (void)configure { 15 | [self bindClass:[VTDAddWireFrame class] inScope:JSObjectionScopeSingleton]; 16 | [self bindClass:[VTDAddWireFrame class] toProtocol:@protocol(VTDAddWireFrame)]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/Module Interface/VTDAddProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddProtocol.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol VTDAddWireFrame 12 | 13 | - (void)presentAddInterfaceFromViewController:(UIViewController *)viewController; 14 | 15 | - (void)dismissAddInterface:(UIViewController *)addViewController; 16 | 17 | @end -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Presenter/VTDAddPresenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddPresenter.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDAddViewController.h" 11 | #import "VTDAddInteractor.h" 12 | 13 | @class VTDAddViewController; 14 | 15 | @interface VTDAddPresenter : NSObject 16 | 17 | @property (nonatomic, weak) VTDAddViewController *userInterface; 18 | 19 | @property (nonatomic, strong) VTDAddInteractor *addInteractor; 20 | 21 | - (void)cancel; 22 | 23 | - (void)save; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Presenter/VTDAddPresenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddPresenter.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddPresenter.h" 10 | 11 | @implementation VTDAddPresenter 12 | 13 | - (instancetype)init{ 14 | self = [super init]; 15 | if (self) { 16 | self.addInteractor = [[VTDAddInteractor alloc] init]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)cancel { 22 | [VTD[@protocol(VTDAddWireFrame)] dismissAddInterface:self.userInterface]; 23 | } 24 | 25 | - (void)save { 26 | [self.addInteractor saveNewEntryWithName:self.userInterface.eventTextField.text 27 | dueDate:self.userInterface.eventDueDatePicker.date]; 28 | [VTD[@protocol(VTDAddWireFrame)] dismissAddInterface:self.userInterface]; 29 | [[NSNotificationCenter defaultCenter] postNotificationName:kVTDAddModuleDidAddItemNotification object:nil]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Transition/VTDAddDismissTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddDismissTransition.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDAddDismissTransition : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Transition/VTDAddDismissTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddDismissTransition.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddDismissTransition.h" 10 | #import "VTDAddViewController.h" 11 | 12 | @implementation VTDAddDismissTransition 13 | 14 | - (NSTimeInterval)transitionDuration:(id)transitionContext { 15 | return 0.50; 16 | } 17 | 18 | - (void)animateTransition:(id)transitionContext { 19 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 20 | 21 | UIView *containerView = [transitionContext containerView]; 22 | UIView *maskView = [containerView viewWithTag:999]; 23 | 24 | CGRect fromViewTargetFrame = fromViewController.view.frame; 25 | fromViewTargetFrame.origin.y = -CGRectGetHeight(fromViewTargetFrame) - 10.0; 26 | 27 | [UIView animateWithDuration:[self transitionDuration:transitionContext] 28 | delay:0.0f 29 | usingSpringWithDamping:0.64f 30 | initialSpringVelocity:0.22f 31 | options:UIViewAnimationCurveEaseIn|UIViewAnimationOptionAllowAnimatedContent 32 | animations:^{ 33 | maskView.alpha = 0.0; 34 | fromViewController.view.frame = fromViewTargetFrame; 35 | } 36 | completion:^(BOOL finished) { 37 | [fromViewController.view removeFromSuperview]; 38 | [maskView removeFromSuperview]; 39 | [transitionContext completeTransition:YES]; 40 | }]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Transition/VTDAddPresentationTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddPresentationTransition.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDAddPresentationTransition : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Transition/VTDAddPresentationTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddPresentationTransition.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddPresentationTransition.h" 10 | #import "VTDAddViewController.h" 11 | 12 | @implementation VTDAddPresentationTransition 13 | 14 | - (NSTimeInterval)transitionDuration:(id)transitionContext { 15 | return 0.50; 16 | } 17 | 18 | - (void)animateTransition:(id)transitionContext{ 19 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 20 | VTDAddViewController *toViewController = (VTDAddViewController *)[transitionContext 21 | viewControllerForKey:UITransitionContextToViewControllerKey]; 22 | UIView *maskView = [self maskView]; 23 | maskView.alpha = 0.0; 24 | [maskView addGestureRecognizer:[[UITapGestureRecognizer alloc] 25 | initWithTarget:toViewController.eventHandler action:@selector(cancel)]]; 26 | 27 | UIView *containerView = [transitionContext containerView]; 28 | // [containerView addSubview:fromViewController.view]; 29 | [containerView addSubview:maskView]; 30 | [containerView addSubview:toViewController.view]; 31 | 32 | toViewController.view.frame = CGRectMake(0, 0, 300, 300); 33 | 34 | CGRect toViewOriginFrame = CGRectMake( 35 | (CGRectGetWidth(fromViewController.view.bounds) - CGRectGetWidth(toViewController.view.bounds)) / 2.0 , 36 | -CGRectGetHeight(toViewController.view.bounds), 37 | CGRectGetWidth(toViewController.view.bounds), 38 | CGRectGetHeight(toViewController.view.bounds) 39 | ); 40 | 41 | CGRect toViewTargetFrame = CGRectMake( 42 | (CGRectGetWidth(fromViewController.view.bounds) - CGRectGetWidth(toViewController.view.bounds)) / 2.0 , 43 | (CGRectGetHeight(fromViewController.view.bounds) - CGRectGetHeight(toViewController.view.bounds)) / 2.0, 44 | CGRectGetWidth(toViewController.view.bounds), 45 | CGRectGetHeight(toViewController.view.bounds) 46 | ); 47 | 48 | toViewController.view.frame = toViewOriginFrame; 49 | 50 | [UIView animateWithDuration:[self transitionDuration:transitionContext] 51 | delay:0.0f 52 | usingSpringWithDamping:0.64f 53 | initialSpringVelocity:0.22f 54 | options:UIViewAnimationCurveEaseIn|UIViewAnimationOptionAllowAnimatedContent 55 | animations:^{ 56 | maskView.alpha = 1.0; 57 | toViewController.view.frame = toViewTargetFrame; 58 | } 59 | completion:^(BOOL finished) { 60 | maskView.alpha = 1.0; 61 | toViewController.view.frame = toViewTargetFrame; 62 | [transitionContext completeTransition:YES]; 63 | }]; 64 | } 65 | 66 | - (UIView *)maskView { 67 | UIView *maskView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 68 | maskView.tag = 999; 69 | maskView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.65]; 70 | maskView.userInteractionEnabled = YES; 71 | return maskView; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/View/VTDAddViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddViewController.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDAddPresenter.h" 11 | 12 | @class VTDAddPresenter; 13 | 14 | @interface VTDAddViewController : UIViewController 15 | 16 | @property (nonatomic, strong) VTDAddPresenter *eventHandler; 17 | @property (weak, nonatomic) IBOutlet UITextField *eventTextField; 18 | @property (weak, nonatomic) IBOutlet UIDatePicker *eventDueDatePicker; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/View/VTDAddViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddViewController.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddViewController.h" 10 | 11 | @interface VTDAddViewController () 12 | 13 | @end 14 | 15 | @implementation VTDAddViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | - (void)viewDidAppear:(BOOL)animated { 23 | [super viewDidAppear:animated]; 24 | [self.eventTextField becomeFirstResponder]; 25 | } 26 | 27 | - (void)viewWillAppear:(BOOL)animated { 28 | [super viewWillAppear:animated]; 29 | [[NSNotificationCenter defaultCenter] addObserver:self 30 | selector:@selector(handleKeywordNotification:) 31 | name:UIKeyboardWillShowNotification 32 | object:nil]; 33 | [[NSNotificationCenter defaultCenter] addObserver:self 34 | selector:@selector(handleKeywordNotification:) 35 | name:UIKeyboardWillHideNotification 36 | object:nil]; 37 | [[NSNotificationCenter defaultCenter] addObserver:self 38 | selector:@selector(handleKeywordNotification:) 39 | name:UIKeyboardWillChangeFrameNotification 40 | object:nil]; 41 | } 42 | 43 | - (void)viewWillDisappear:(BOOL)animated { 44 | [super viewWillDisappear:animated]; 45 | [[NSNotificationCenter defaultCenter] removeObserver:self 46 | name:UIKeyboardWillShowNotification 47 | object:nil]; 48 | [[NSNotificationCenter defaultCenter] removeObserver:self 49 | name:UIKeyboardWillHideNotification 50 | object:nil]; 51 | [[NSNotificationCenter defaultCenter] removeObserver:self 52 | name:UIKeyboardWillChangeFrameNotification 53 | object:nil]; 54 | } 55 | 56 | - (void)didReceiveMemoryWarning { 57 | [super didReceiveMemoryWarning]; 58 | // Dispose of any resources that can be recreated. 59 | } 60 | 61 | /* 62 | #pragma mark - Navigation 63 | 64 | // In a storyboard-based application, you will often want to do a little preparation before navigation 65 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 66 | // Get the new view controller using [segue destinationViewController]. 67 | // Pass the selected object to the new view controller. 68 | } 69 | */ 70 | 71 | - (IBAction)handleCancelButtonTapped:(id)sender { 72 | [self.eventHandler cancel]; 73 | } 74 | 75 | - (IBAction)handleSaveButtonTapped:(id)sender { 76 | [self.eventHandler save]; 77 | } 78 | 79 | #pragma mark - UITextFieldDelegate 80 | 81 | - (BOOL)textFieldShouldReturn:(UITextField *)textField { 82 | [textField resignFirstResponder]; 83 | return YES; 84 | } 85 | 86 | #pragma mark - keyword adjusting 87 | 88 | - (void)handleKeywordNotification:(NSNotification *)notification { 89 | NSDictionary *keyboardInfo = [notification userInfo]; 90 | CGRect keyboardFrame = [[keyboardInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; 91 | NSTimeInterval animationDuration = [[keyboardInfo valueForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; 92 | CGRect viewFrame = self.view.frame; 93 | viewFrame.origin.y = MAX(0, (keyboardFrame.origin.y - viewFrame.size.height) / 2.0); 94 | [UIView animateWithDuration:animationDuration animations:^{ 95 | self.view.frame = viewFrame; 96 | }]; 97 | } 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Wireframe/VTDAddWireFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddWireFrame.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDAddWireFrame : NSObject 12 | 13 | - (void)presentAddInterfaceFromViewController:(UIViewController *)viewController; 14 | 15 | - (void)dismissAddInterface:(UIViewController *)addViewController; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/Add/User Interface/Wireframe/VTDAddWireFrame.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDAddWireFrame.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDAddWireFrame.h" 10 | #import "VTDAddViewController.h" 11 | #import "VTDAddPresenter.h" 12 | #import "VTDAddPresentationTransition.h" 13 | #import "VTDAddDismissTransition.h" 14 | 15 | @interface VTDAddWireFrame () 16 | 17 | @end 18 | 19 | @implementation VTDAddWireFrame 20 | 21 | - (void)presentAddInterfaceFromViewController:(UIViewController *)viewController { 22 | VTDAddViewController *addViewController = [self addViewController]; 23 | addViewController.modalPresentationStyle = UIModalPresentationCustom; 24 | addViewController.transitioningDelegate = self; 25 | [viewController presentViewController:addViewController animated:YES completion:nil]; 26 | } 27 | 28 | - (VTDAddViewController *)addViewController { 29 | UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"VTD" bundle:[NSBundle mainBundle]]; 30 | VTDAddViewController *addViewController = [storyBoard instantiateViewControllerWithIdentifier:@"VTDAddViewController"]; 31 | addViewController.eventHandler = [[VTDAddPresenter alloc] init]; 32 | addViewController.eventHandler.userInterface = addViewController; 33 | return addViewController; 34 | } 35 | 36 | - (void)dismissAddInterface:(UIViewController *)addViewController { 37 | addViewController.modalPresentationStyle = UIModalPresentationCustom; 38 | addViewController.transitioningDelegate = self; 39 | [addViewController dismissViewControllerAnimated:YES completion:nil]; 40 | } 41 | 42 | #pragma mark - UIViewControllerTransitioningDelegate 43 | 44 | - (id)animationControllerForDismissedController:(UIViewController *)dismissed { 45 | return [[VTDAddDismissTransition alloc] init]; 46 | } 47 | 48 | - (id)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { 49 | return [[VTDAddPresentationTransition alloc] init]; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Interactor/VTDListInteractor.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListInteractor.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDListInteractor : NSObject 12 | 13 | @property (nonatomic, readonly) NSDictionary *listData;/** VTDListUpcomingItemDateRelation : NSArray **/ 14 | 15 | - (void)findUpcomingItem:(void (^)())completionBlock; 16 | 17 | @end -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Interactor/VTDListInteractor.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListInteractor.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListInteractor.h" 10 | #import "VTDListDataManager.h" 11 | #import "VTDListUpcomingItem.h" 12 | 13 | @interface VTDListInteractor () 14 | 15 | @property (nonatomic, strong) id dataManager; 16 | 17 | @property (nonatomic, readwrite) NSDictionary *listData;/** VTDListUpcomingItemDateRelation : NSArray **/ 18 | 19 | @end 20 | 21 | @implementation VTDListInteractor 22 | 23 | - (instancetype)init { 24 | self = [super init]; 25 | if (self) { 26 | self.dataManager = [[VTDListDataManager alloc] init]; 27 | } 28 | return self; 29 | } 30 | 31 | - (void)findUpcomingItem:(void (^)())completionBlock { 32 | [self.dataManager fetchUpcomingTodoItems:^(NSArray *items) { 33 | [items VTD_collectArrayAsObject:[VTDListUpcomingItem class] completionBlock:^(NSArray *collectedArray) { 34 | [self updateListData:collectedArray]; 35 | if (completionBlock) { 36 | completionBlock(); 37 | } 38 | }]; 39 | }]; 40 | } 41 | 42 | - (void)updateListData:(NSArray *)upcomingItems { 43 | //re-organize items 44 | NSMutableDictionary *listData = [NSMutableDictionary dictionary]; 45 | [upcomingItems enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 46 | VTDListUpcomingItem *item = obj; 47 | NSString *numberKey = [NSString stringWithFormat:@"%d", item.relation]; 48 | if (listData[numberKey] == nil) { 49 | listData[numberKey] = [NSMutableArray array]; 50 | } 51 | NSMutableArray *sectionArray = listData[numberKey]; 52 | [sectionArray addObject:item]; 53 | }]; 54 | [listData enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 55 | [listData setObject:[obj copy] forKey:key]; 56 | }]; 57 | self.listData = [listData copy]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Interactor/VTDListUpcomingItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListUpcomingItem.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | VTDListUpcomingItemDateRelationToday, 13 | VTDListUpcomingItemDateRelationTomorrow, 14 | VTDListUpcomingItemDateRelationLaterThisWeek, 15 | VTDListUpcomingItemDateRelationNextWeek, 16 | VTDListUpcomingItemDateRelationOutOfRange 17 | }VTDListUpcomingItemDateRelation; 18 | 19 | @interface VTDListUpcomingItem : NSObject 20 | 21 | @property (nonatomic, readonly, assign) VTDListUpcomingItemDateRelation relation; 22 | @property (nonatomic, readonly, copy) NSString *title; 23 | @property (nonatomic, readonly, strong) NSDate *dueDate; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Interactor/VTDListUpcomingItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListUpcomingItem.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListUpcomingItem.h" 10 | 11 | @interface VTDListUpcomingItem () 12 | 13 | @property (nonatomic, readwrite, copy) NSString *title; 14 | @property (nonatomic, readwrite, strong) NSDate *dueDate; 15 | 16 | @end 17 | 18 | @implementation VTDListUpcomingItem 19 | 20 | - (VTDListUpcomingItemDateRelation)relation { 21 | NSDate *today = [NSDate date]; 22 | NSInteger todaySecs = (int)[today timeIntervalSince1970] % 86400; 23 | NSTimeInterval todayStandardTime = [today timeIntervalSince1970] - todaySecs; 24 | 25 | //Thursday -> Monday, Week Start at Monday. 26 | NSInteger weekSecs = ((int)[today timeIntervalSince1970] - 86400 * 4) % (86400 * 7); 27 | NSTimeInterval weekStandardTime = [today timeIntervalSince1970] - weekSecs; 28 | 29 | NSTimeInterval dayInteval = [self.dueDate timeIntervalSince1970] - todayStandardTime; 30 | NSTimeInterval weekInteval = [self.dueDate timeIntervalSince1970] - weekStandardTime; 31 | if (dayInteval < 86400) { 32 | return VTDListUpcomingItemDateRelationToday; 33 | } 34 | else if (dayInteval < 86400 * 2) { 35 | return VTDListUpcomingItemDateRelationTomorrow; 36 | } 37 | else if (weekInteval < 86400 * 7) { 38 | return VTDListUpcomingItemDateRelationLaterThisWeek; 39 | } 40 | else if (weekInteval < 86400 * 14) { 41 | return VTDListUpcomingItemDateRelationNextWeek; 42 | } 43 | else { 44 | return VTDListUpcomingItemDateRelationOutOfRange; 45 | } 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Manager/VTDListDataManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListDataManager.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDListDataManager : NSObject 12 | 13 | - (void)fetchUpcomingTodoItems:(void (^)(NSArray *items))completionBlock; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Manager/VTDListDataManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListDataManager.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListDataManager.h" 10 | #import "VTDTodoItem.h" 11 | 12 | @implementation VTDListDataManager 13 | 14 | - (void)fetchUpcomingTodoItems:(void (^)(NSArray *))completionBlock { 15 | NSDate *now = [NSDate date]; 16 | NSInteger todaySecs = (int)[now timeIntervalSince1970] % 86400; 17 | NSTimeInterval todayStandardTime = [now timeIntervalSince1970] - todaySecs; 18 | NSDate *startDate = [NSDate dateWithTimeIntervalSince1970:todayStandardTime]; 19 | NSDate *endDate = [NSDate dateWithTimeIntervalSinceNow:86400*14]; 20 | NSPredicate *upcomingPredicate = [NSPredicate predicateWithFormat:@"(date > %@) AND (date<=%@)", 21 | startDate, 22 | endDate]; 23 | [VTD[@protocol(VTDCoreDataStore)] 24 | fetchEntriesWithEntryName:@"TodoItem" 25 | predicate:upcomingPredicate 26 | sortDescriptors:@[] 27 | completionBlock:^(NSArray *results) { 28 | [results VTD_collectArrayAsObject:[VTDTodoItem class] completionBlock:^(NSArray *collectedArray) { 29 | if (completionBlock) { 30 | completionBlock(collectedArray); 31 | } 32 | }]; 33 | }]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Provider/VTDListUpcomingItemProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListUpcomingItemProvider.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDListUpcomingItemProvider : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Application Logic/Provider/VTDListUpcomingItemProvider.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListUpcomingItemProvider.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListUpcomingItemProvider.h" 10 | #import "VTDListUpcomingItem.h" 11 | #import "VTDTodoItem.h" 12 | 13 | @interface VTDListUpcomingItem (writable) 14 | 15 | @property (nonatomic, readwrite, copy) NSString *title; 16 | @property (nonatomic, readwrite, strong) NSDate *dueDate; 17 | 18 | @end 19 | 20 | @implementation VTDListUpcomingItemProvider 21 | 22 | - (id)provide:(JSObjectionInjector *)context arguments:(NSArray *)arguments { 23 | if ([[arguments firstObject] isKindOfClass:[VTDTodoItem class]]) { 24 | VTDTodoItem *modelItem = [arguments firstObject]; 25 | VTDListUpcomingItem *anItem = [[VTDListUpcomingItem alloc] init]; 26 | anItem.title = modelItem.name; 27 | anItem.dueDate = modelItem.date; 28 | return anItem; 29 | } 30 | return nil; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Module Interface/VTDListModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListModule.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "JSObjectionModule.h" 10 | 11 | @interface VTDListModule : JSObjectionModule 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Module Interface/VTDListModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListModule.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListModule.h" 10 | #import "VTDListWireFrame.h" 11 | #import "VTDListUpcomingItem.h" 12 | #import "VTDListUpcomingItemProvider.h" 13 | 14 | @implementation VTDListModule 15 | 16 | - (void)configure { 17 | [self bindClass:[VTDListWireFrame class] inScope:JSObjectionScopeSingleton]; 18 | [self bindClass:[VTDListWireFrame class] toProtocol:@protocol(VTDListWireFrame)]; 19 | [self bindProvider:[[VTDListUpcomingItemProvider alloc] init] toClass:[VTDListUpcomingItem class]]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/Module Interface/VTDListProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListProtocol.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol VTDListWireFrame 12 | 13 | - (void)presentListViewControllerToWindow:(UIWindow *)window; 14 | 15 | - (UITableViewCell *)configureCellForListTableView:(UITableView *)tableView 16 | interactorObject:(id)interactorObject; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/Presenter/VTDListPresenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListPresenter.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDListViewController.h" 11 | #import "VTDListInteractor.h" 12 | 13 | @class VTDListViewController; 14 | 15 | @interface VTDListPresenter : NSObject 16 | 17 | @property (nonatomic, weak) VTDListViewController *userInterface; 18 | 19 | @property (nonatomic, strong) VTDListInteractor *listInteractor; 20 | 21 | - (void)updateView; 22 | 23 | - (void)addNewEntry; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/Presenter/VTDListPresenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListPresenter.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListPresenter.h" 10 | #import "VTDListInteractor.h" 11 | 12 | @implementation VTDListPresenter 13 | 14 | - (void)dealloc { 15 | [[NSNotificationCenter defaultCenter] removeObserver:self 16 | name:kVTDAddModuleDidAddItemNotification 17 | object:nil]; 18 | } 19 | 20 | - (instancetype)init { 21 | self = [super init]; 22 | if (self) { 23 | self.listInteractor = [[VTDListInteractor alloc] init]; 24 | [[NSNotificationCenter defaultCenter] addObserver:self 25 | selector:@selector(updateView) 26 | name:kVTDAddModuleDidAddItemNotification 27 | object:nil]; 28 | } 29 | return self; 30 | } 31 | 32 | - (void)updateView { 33 | [self.listInteractor findUpcomingItem:^{ 34 | if ([self.listInteractor.listData count] == 0) { 35 | [self.userInterface showNoContents]; 36 | } 37 | else { 38 | [self.userInterface reloadTableView]; 39 | [self.userInterface showTableView]; 40 | } 41 | }]; 42 | } 43 | 44 | - (void)addNewEntry { 45 | [VTD[@protocol(VTDAddWireFrame)] presentAddInterfaceFromViewController:self.userInterface]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/Presenter/VTDListTableViewCellPresenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListTableViewCellPresenter.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDListTableViewCell.h" 11 | #import "VTDListUpcomingItem.h" 12 | 13 | @class VTDListTableViewCell; 14 | 15 | @interface VTDListTableViewCellPresenter : NSObject 16 | 17 | @property (nonatomic, weak) VTDListTableViewCell *userInterface; 18 | 19 | @property (nonatomic, strong) VTDListUpcomingItem *upcomingItem; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/Presenter/VTDListTableViewCellPresenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListTableViewCellPresenter.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListTableViewCellPresenter.h" 10 | 11 | @implementation VTDListTableViewCellPresenter 12 | 13 | - (void)setUpcomingItem:(VTDListUpcomingItem *)upcomingItem { 14 | [self.userInterface setEventNameLabelText:upcomingItem.title]; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/View/VTDListTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListTableViewCell.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDListTableViewCellPresenter.h" 11 | 12 | @class VTDListTableViewCellPresenter; 13 | 14 | @interface VTDListTableViewCell : UITableViewCell 15 | 16 | @property (nonatomic, strong) VTDListTableViewCellPresenter *eventHandler; 17 | 18 | - (void)setEventNameLabelText:(NSString *)text; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/View/VTDListTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListTableViewCell.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListTableViewCell.h" 10 | 11 | @interface VTDListTableViewCell () 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *eventNameLabel; 14 | 15 | @end 16 | 17 | @implementation VTDListTableViewCell 18 | 19 | - (void)awakeFromNib { 20 | // Initialization code 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 24 | [super setSelected:selected animated:animated]; 25 | 26 | // Configure the view for the selected state 27 | } 28 | 29 | - (void)setEventNameLabelText:(NSString *)text { 30 | self.eventNameLabel.text = text; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/View/VTDListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListViewController.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VTDListPresenter.h" 11 | 12 | @class VTDListPresenter; 13 | 14 | @interface VTDListViewController : UIViewController 15 | 16 | @property (nonatomic, strong) VTDListPresenter *eventHandler; 17 | 18 | - (void)showNoContents; 19 | 20 | - (void)showTableView; 21 | 22 | - (void)reloadTableView; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/View/VTDListViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListViewController.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListViewController.h" 10 | #import "VTDListUpcomingItem.h" 11 | 12 | @interface VTDListViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 15 | @property (weak, nonatomic) IBOutlet UIView *noContentView; 16 | 17 | @property (nonatomic, readonly) NSDictionary *data; 18 | 19 | @end 20 | 21 | @implementation VTDListViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | [self.eventHandler updateView]; 26 | // Do any additional setup after loading the view. 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | #pragma mark - No Content OR TableView 35 | 36 | - (void)showNoContents { 37 | [self.noContentView setHidden:NO]; 38 | [self.tableView setHidden:YES]; 39 | } 40 | 41 | - (void)showTableView { 42 | [self.noContentView setHidden:YES]; 43 | [self.tableView setHidden:NO]; 44 | } 45 | 46 | - (void)reloadTableView { 47 | [self.tableView reloadData]; 48 | } 49 | 50 | #pragma mark - UITableViewDelegate & UITableViewDataSource 51 | 52 | - (NSDictionary *)data { 53 | return [self.eventHandler.listInteractor.listData copy]; 54 | } 55 | 56 | - (NSArray *)sortedKeys { 57 | return [[self.data allKeys] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { 58 | if ([obj1 integerValue] == [obj2 integerValue]) { 59 | return 0; 60 | } 61 | else { 62 | return [obj1 integerValue] > [obj2 integerValue] ? 1 : -1; 63 | } 64 | }]; 65 | } 66 | 67 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 68 | id interactorObject; 69 | NSArray *sortedKeys = [self sortedKeys]; 70 | if (indexPath.section < [sortedKeys count]) { 71 | NSString *numberKey = [NSString stringWithFormat:@"%@", sortedKeys[indexPath.section]]; 72 | NSArray *upcomingItems = [self.data valueForKey:numberKey]; 73 | if (indexPath.row < [upcomingItems count]) { 74 | interactorObject = upcomingItems[indexPath.row]; 75 | } 76 | } 77 | return [VTD[@protocol(VTDListWireFrame)] configureCellForListTableView:tableView 78 | interactorObject:interactorObject]; 79 | } 80 | 81 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 82 | return [self.data count]; 83 | } 84 | 85 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 86 | NSArray *sortedKeys = [self sortedKeys]; 87 | if (section < [sortedKeys count]) { 88 | NSString *numberKey = [NSString stringWithFormat:@"%@", sortedKeys[section]]; 89 | if ([self.data valueForKey:numberKey] != nil) { 90 | return [[self.data valueForKey:numberKey] count]; 91 | } 92 | } 93 | return 0.0; 94 | } 95 | 96 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 97 | return 44.0; 98 | } 99 | 100 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 101 | NSArray *sortedKeys = [self sortedKeys]; 102 | if (section < [sortedKeys count]) { 103 | NSInteger enumInteger = [sortedKeys[section] integerValue]; 104 | switch (enumInteger) { 105 | case VTDListUpcomingItemDateRelationToday: 106 | return @"Today"; 107 | break; 108 | case VTDListUpcomingItemDateRelationTomorrow: 109 | return @"Tomorrow"; 110 | break; 111 | case VTDListUpcomingItemDateRelationLaterThisWeek: 112 | return @"This Week"; 113 | break; 114 | case VTDListUpcomingItemDateRelationNextWeek: 115 | return @"Next Week"; 116 | break; 117 | case VTDListUpcomingItemDateRelationOutOfRange: 118 | return @"Others"; 119 | break; 120 | default: 121 | break; 122 | } 123 | } 124 | return nil; 125 | } 126 | 127 | #pragma mark - Handle Events 128 | 129 | - (IBAction)handleAddButtonTapped:(id)sender { 130 | [self.eventHandler addNewEntry]; 131 | } 132 | 133 | 134 | @end 135 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/Wireframe/VTDListWireFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListWireFrame.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDListWireFrame : NSObject 12 | 13 | - (void)presentListViewControllerToWindow:(UIWindow *)window; 14 | 15 | - (UITableViewCell *)configureCellForListTableView:(UITableView *)tableView 16 | interactorObject:(id)interactorObject; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/Modules/List/User Interface/Wireframe/VTDListWireFrame.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListWireFrame.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDListWireFrame.h" 10 | #import "VTDWireFrame.h" 11 | #import "VTDListViewController.h" 12 | #import "VTDListPresenter.h" 13 | #import "VTDListTableViewCell.h" 14 | #import "VTDListTableViewCellPresenter.h" 15 | 16 | @implementation VTDListWireFrame 17 | 18 | - (void)presentListViewControllerToWindow:(UIWindow *)window { 19 | [VTD[@protocol(VTDWireFrame)] presentRootViewControllerToWindow:window 20 | viewControllers:@[[self listViewController]]]; 21 | } 22 | 23 | - (VTDListViewController *)listViewController { 24 | UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"VTD" bundle:[NSBundle mainBundle]]; 25 | VTDListViewController *listViewController = [storyBoard instantiateViewControllerWithIdentifier:@"VTDListViewController"]; 26 | listViewController.eventHandler = [[VTDListPresenter alloc] init]; 27 | listViewController.eventHandler.userInterface = listViewController; 28 | return listViewController; 29 | } 30 | 31 | - (UITableViewCell *)configureCellForListTableView:(UITableView *)tableView 32 | interactorObject:(id)interactorObject { 33 | static NSString *cellIdentifier = @"Cell"; 34 | VTDListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 35 | if (cell == nil) { 36 | cell = [self listTableViewCell]; 37 | } 38 | cell.eventHandler.upcomingItem = interactorObject; 39 | return cell; 40 | } 41 | 42 | - (VTDListTableViewCell *)listTableViewCell { 43 | VTDListTableViewCell *cell = [[[NSBundle mainBundle] loadNibNamed:@"VTDListTableViewCell" owner:nil options:nil] firstObject]; 44 | cell.eventHandler = [[VTDListTableViewCellPresenter alloc] init]; 45 | cell.eventHandler.userInterface = cell; 46 | return cell; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/VTDApplication.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDApplication.h 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | //Protocols 13 | #import "VTDListProtocol.h" 14 | #import "VTDCoreProtocol.h" 15 | #import "VTDAddProtocol.h" 16 | 17 | //Categories 18 | #import "NSArray+VTDObjectsCollector.h" 19 | 20 | //Application Marcos 21 | #define VTD [VTDApplication injector] 22 | #define kVTDAddModuleDidAddItemNotification @"kVTDAddModuleDidAddItemNotification" 23 | 24 | @interface VTDApplication : NSObject 25 | 26 | + (JSObjectionInjector *)injector; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Classes/VTDApplication.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDApplication.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import "VTDApplication.h" 10 | #import "VTDCoreModule.h" 11 | #import "VTDListModule.h" 12 | #import "VTDAddModule.h" 13 | 14 | @implementation VTDApplication 15 | 16 | + (JSObjectionInjector *)injector { 17 | static JSObjectionInjector *injector; 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | injector = [JSObjection createInjectorWithModules: 21 | [[VTDCoreModule alloc] init], 22 | [[VTDListModule alloc] init], 23 | [[VTDAddModule alloc] init], 24 | nil]; 25 | }); 26 | return injector; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Resources/VTD.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /objectionViper/VTDApplication/Resources/VTDListTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /objectionViper/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /objectionViperTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.duowan.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /objectionViperTests/VTDListTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDListTests.m 3 | // objectionViper 4 | // 5 | // Created by 崔 明辉 on 15/1/21. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "VTDApplication.h" 12 | #import "VTDTodoItem.h" 13 | #import "VTDListUpcomingItem.h" 14 | 15 | @interface VTDListTests : XCTestCase 16 | 17 | @end 18 | 19 | @implementation VTDListTests 20 | 21 | - (void)setUp { 22 | [super setUp]; 23 | // Put setup code here. This method is called before the invocation of each test method in the class. 24 | } 25 | 26 | - (void)tearDown { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | [super tearDown]; 29 | } 30 | 31 | - (void)testUpcomingItemProvider { 32 | { 33 | id anObject = [[VTDApplication injector] getObject:[VTDListUpcomingItem class] argumentList:@[]]; 34 | XCTAssert(anObject == nil, @"Pass"); 35 | } 36 | { 37 | VTDTodoItem *anModel = [[VTDTodoItem alloc] init]; 38 | anModel.name = @"Test Name"; 39 | anModel.date = [NSDate date]; 40 | id anObject = [[VTDApplication injector] getObject:[VTDListUpcomingItem class] argumentList:@[anModel]]; 41 | XCTAssert([anObject isKindOfClass:[VTDListUpcomingItem class]], @"Pass"); 42 | XCTAssert([[(VTDListUpcomingItem *)anObject title] isEqualToString:anModel.name], @"Pass"); 43 | XCTAssert([[(VTDListUpcomingItem *)anObject dueDate] isEqualToDate:anModel.date], @"Pass"); 44 | } 45 | } 46 | 47 | - (void)testUpcomingItemRelation { 48 | { 49 | VTDTodoItem *anModel = [[VTDTodoItem alloc] init]; 50 | anModel.name = @"Test Name"; 51 | anModel.date = [NSDate date]; 52 | id anObject = [[VTDApplication injector] getObject:[VTDListUpcomingItem class] argumentList:@[anModel]]; 53 | XCTAssert([(VTDListUpcomingItem *)anObject relation] == VTDListUpcomingItemDateRelationToday, @"Pass"); 54 | } 55 | { 56 | VTDTodoItem *anModel = [[VTDTodoItem alloc] init]; 57 | anModel.name = @"Test Name"; 58 | anModel.date = [NSDate dateWithTimeIntervalSinceNow:+86400]; 59 | id anObject = [[VTDApplication injector] getObject:[VTDListUpcomingItem class] argumentList:@[anModel]]; 60 | XCTAssert([(VTDListUpcomingItem *)anObject relation] == VTDListUpcomingItemDateRelationTomorrow, @"Pass"); 61 | } 62 | { 63 | VTDTodoItem *anModel = [[VTDTodoItem alloc] init]; 64 | anModel.name = @"Test Name"; 65 | anModel.date = [NSDate dateWithTimeIntervalSinceNow:+86400*7];NSLog(@"%@", anModel.date); 66 | id anObject = [[VTDApplication injector] getObject:[VTDListUpcomingItem class] argumentList:@[anModel]]; 67 | XCTAssert([(VTDListUpcomingItem *)anObject relation] == VTDListUpcomingItemDateRelationNextWeek, @"Pass"); 68 | } 69 | { 70 | VTDTodoItem *anModel = [[VTDTodoItem alloc] init]; 71 | anModel.name = @"Test Name"; 72 | anModel.date = [NSDate distantFuture]; 73 | id anObject = [[VTDApplication injector] getObject:[VTDListUpcomingItem class] argumentList:@[anModel]]; 74 | XCTAssert([(VTDListUpcomingItem *)anObject relation] == VTDListUpcomingItemDateRelationOutOfRange, @"Pass"); 75 | } 76 | } 77 | 78 | //- (void)testExample { 79 | // // This is an example of a functional test case. 80 | // XCTAssert(YES, @"Pass"); 81 | //} 82 | // 83 | //- (void)testPerformanceExample { 84 | // // This is an example of a performance test case. 85 | // [self measureBlock:^{ 86 | // // Put the code you want to measure the time of here. 87 | // }]; 88 | //} 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /objectionViperTests/objectionViperTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // objectionViperTests.m 3 | // objectionViperTests 4 | // 5 | // Created by 崔 明辉 on 15/1/20. 6 | // Copyright (c) 2015年 多玩事业部 iOS开发组 YY Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface objectionViperTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation objectionViperTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------