├── SwiftMVVMKitDemo ├── Pods │ ├── Headers │ │ └── Private │ │ │ ├── FMDB │ │ │ ├── FMDB.h │ │ │ ├── FMDatabase.h │ │ │ ├── FMResultSet.h │ │ │ ├── FMDatabasePool.h │ │ │ ├── FMDatabaseQueue.h │ │ │ └── FMDatabaseAdditions.h │ │ │ ├── MJRefresh │ │ │ ├── MJRefresh.h │ │ │ ├── MJRefreshConst.h │ │ │ ├── MJRefreshFooter.h │ │ │ ├── MJRefreshHeader.h │ │ │ ├── UIView+MJExtension.h │ │ │ ├── MJRefreshComponent.h │ │ │ ├── MJRefreshAutoFooter.h │ │ │ ├── MJRefreshBackFooter.h │ │ │ ├── UIScrollView+MJRefresh.h │ │ │ ├── MJRefreshGifHeader.h │ │ │ ├── UIScrollView+MJExtension.h │ │ │ ├── MJRefreshNormalHeader.h │ │ │ ├── MJRefreshStateHeader.h │ │ │ ├── MJRefreshAutoGifFooter.h │ │ │ ├── MJRefreshAutoStateFooter.h │ │ │ ├── MJRefreshBackGifFooter.h │ │ │ ├── MJRefreshBackStateFooter.h │ │ │ ├── MJRefreshAutoNormalFooter.h │ │ │ └── MJRefreshBackNormalFooter.h │ │ │ ├── MJExtension │ │ │ ├── MJProperty.h │ │ │ ├── MJExtension.h │ │ │ ├── MJFoundation.h │ │ │ ├── MJPropertyKey.h │ │ │ ├── MJPropertyType.h │ │ │ ├── MJExtensionConst.h │ │ │ ├── NSObject+MJClass.h │ │ │ ├── NSObject+MJCoding.h │ │ │ ├── NSObject+MJKeyValue.h │ │ │ ├── NSObject+MJProperty.h │ │ │ └── NSString+MJExtension.h │ │ │ ├── AFNetworking │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFImageDownloader.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIImage+AFNetworking.h │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── UIWebView+AFNetworking.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ └── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── SUIMVVMStore │ │ │ ├── SMKStorePublic.h │ │ │ ├── SMKStore.h │ │ │ └── YTKKeyValueStore.h │ │ │ ├── SUIMVVMNetwork │ │ │ ├── SMKHttp.h │ │ │ ├── SMKNetworkPublic.h │ │ │ ├── SMKHttpConfig.h │ │ │ ├── SMKSingleton.h │ │ │ └── SMKDataService.h │ │ │ ├── UITableView+FDTemplateLayoutCell │ │ │ ├── UITableView+FDKeyedHeightCache.h │ │ │ ├── UITableView+FDIndexPathHeightCache.h │ │ │ ├── UITableView+FDTemplateLayoutCell.h │ │ │ └── UITableView+FDTemplateLayoutCellDebug.h │ │ │ └── FDFullscreenPopGesture │ │ │ └── UINavigationController+FDFullscreenPopGesture.h │ ├── .DS_Store │ ├── Target Support Files │ │ ├── FMDB │ │ │ ├── FMDB-prefix.pch │ │ │ ├── FMDB.modulemap │ │ │ ├── FMDB-dummy.m │ │ │ ├── FMDB.xcconfig │ │ │ ├── FMDB-umbrella.h │ │ │ └── Info.plist │ │ ├── SnapKit │ │ │ ├── SnapKit-prefix.pch │ │ │ ├── SnapKit.modulemap │ │ │ ├── SnapKit-dummy.m │ │ │ ├── SnapKit-umbrella.h │ │ │ ├── SnapKit.xcconfig │ │ │ └── Info.plist │ │ ├── MJRefresh │ │ │ ├── MJRefresh-prefix.pch │ │ │ ├── MJRefresh.modulemap │ │ │ ├── MJRefresh-dummy.m │ │ │ ├── MJRefresh.xcconfig │ │ │ ├── MJRefresh-umbrella.h │ │ │ └── Info.plist │ │ ├── MJExtension │ │ │ ├── MJExtension-prefix.pch │ │ │ ├── MJExtension.modulemap │ │ │ ├── MJExtension-dummy.m │ │ │ ├── MJExtension.xcconfig │ │ │ ├── MJExtension-umbrella.h │ │ │ └── Info.plist │ │ ├── SUIMVVMStore │ │ │ ├── SUIMVVMStore-prefix.pch │ │ │ ├── SUIMVVMStore.modulemap │ │ │ ├── SUIMVVMStore-dummy.m │ │ │ ├── SUIMVVMStore.xcconfig │ │ │ ├── SUIMVVMStore-umbrella.h │ │ │ └── Info.plist │ │ ├── SUIMVVMNetwork │ │ │ ├── SUIMVVMNetwork-prefix.pch │ │ │ ├── SUIMVVMNetwork.modulemap │ │ │ ├── SUIMVVMNetwork-dummy.m │ │ │ ├── SUIMVVMNetwork.xcconfig │ │ │ ├── SUIMVVMNetwork-umbrella.h │ │ │ └── Info.plist │ │ ├── SwiftExtensionKit │ │ │ ├── SwiftExtensionKit-prefix.pch │ │ │ ├── SwiftExtensionKit.modulemap │ │ │ ├── SwiftExtensionKit-dummy.m │ │ │ ├── SwiftExtensionKit-umbrella.h │ │ │ ├── SwiftExtensionKit.xcconfig │ │ │ └── Info.plist │ │ ├── FDFullscreenPopGesture │ │ │ ├── FDFullscreenPopGesture-prefix.pch │ │ │ ├── FDFullscreenPopGesture.modulemap │ │ │ ├── FDFullscreenPopGesture-dummy.m │ │ │ ├── FDFullscreenPopGesture.xcconfig │ │ │ ├── FDFullscreenPopGesture-umbrella.h │ │ │ └── Info.plist │ │ ├── UITableView+FDTemplateLayoutCell │ │ │ ├── UITableView+FDTemplateLayoutCell-prefix.pch │ │ │ ├── UITableView+FDTemplateLayoutCell.modulemap │ │ │ ├── UITableView+FDTemplateLayoutCell-dummy.m │ │ │ ├── UITableView+FDTemplateLayoutCell.xcconfig │ │ │ ├── UITableView+FDTemplateLayoutCell-umbrella.h │ │ │ └── Info.plist │ │ ├── Pods │ │ │ ├── Pods.modulemap │ │ │ ├── Pods-dummy.m │ │ │ ├── Pods-umbrella.h │ │ │ ├── Info.plist │ │ │ ├── Pods.debug.xcconfig │ │ │ └── Pods.release.xcconfig │ │ └── AFNetworking │ │ │ ├── AFNetworking.modulemap │ │ │ ├── AFNetworking-dummy.m │ │ │ ├── AFNetworking-prefix.pch │ │ │ ├── AFNetworking.xcconfig │ │ │ ├── AFNetworking-umbrella.h │ │ │ └── Info.plist │ ├── MJRefresh │ │ ├── MJRefresh │ │ │ ├── MJRefresh.bundle │ │ │ │ └── arrow@2x.png │ │ │ ├── Base │ │ │ │ ├── MJRefreshBackFooter.h │ │ │ │ ├── MJRefreshAutoFooter.h │ │ │ │ ├── MJRefreshHeader.h │ │ │ │ ├── MJRefreshFooter.h │ │ │ │ └── MJRefreshFooter.m │ │ │ ├── Custom │ │ │ │ ├── Footer │ │ │ │ │ ├── Auto │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.h │ │ │ │ │ │ ├── MJRefreshAutoGifFooter.h │ │ │ │ │ │ ├── MJRefreshAutoStateFooter.h │ │ │ │ │ │ └── MJRefreshAutoNormalFooter.m │ │ │ │ │ └── Back │ │ │ │ │ │ ├── MJRefreshBackNormalFooter.h │ │ │ │ │ │ ├── MJRefreshBackStateFooter.h │ │ │ │ │ │ ├── MJRefreshBackGifFooter.h │ │ │ │ │ │ └── MJRefreshBackStateFooter.m │ │ │ │ └── Header │ │ │ │ │ ├── MJRefreshNormalHeader.h │ │ │ │ │ ├── MJRefreshGifHeader.h │ │ │ │ │ └── MJRefreshStateHeader.h │ │ │ ├── MJRefresh.h │ │ │ ├── UIView+MJExtension.h │ │ │ ├── UIScrollView+MJExtension.h │ │ │ ├── UIScrollView+MJRefresh.h │ │ │ ├── MJRefreshConst.m │ │ │ └── UIView+MJExtension.m │ │ └── LICENSE │ ├── FMDB │ │ ├── src │ │ │ └── fmdb │ │ │ │ └── FMDB.h │ │ └── LICENSE.txt │ ├── SUIMVVMStore │ │ ├── SUIMVVMStore │ │ │ └── SMKStorePublic.h │ │ └── LICENSE │ ├── MJExtension │ │ ├── MJExtension │ │ │ ├── MJFoundation.h │ │ │ ├── MJExtension.h │ │ │ ├── MJPropertyKey.h │ │ │ ├── MJPropertyKey.m │ │ │ ├── MJExtensionConst.m │ │ │ ├── MJPropertyType.h │ │ │ ├── NSObject+MJCoding.h │ │ │ ├── NSString+MJExtension.h │ │ │ ├── MJProperty.h │ │ │ ├── MJFoundation.m │ │ │ └── NSObject+MJCoding.m │ │ └── LICENSE │ ├── SUIMVVMNetwork │ │ ├── SUIMVVMNetwork │ │ │ ├── SMKNetworkPublic.h │ │ │ └── SUIMVVMNetwork │ │ │ │ ├── SMKHttpConfig.h │ │ │ │ ├── SMKDataService.h │ │ │ │ └── SMKSingleton.h │ │ └── LICENSE │ ├── SwiftExtensionKit │ │ ├── SwiftExtensionKit │ │ │ ├── SEKUIImageView+Corner.swift │ │ │ ├── SEKUIViewController+Storyboard.swift │ │ │ ├── SEKView+UIViewController.swift │ │ │ └── SEKView+Nib.swift │ │ ├── README.md │ │ └── LICENSE │ ├── SnapKit │ │ ├── LICENSE │ │ ├── README.md │ │ └── Source │ │ │ ├── SnapKit.swift │ │ │ ├── ConstraintRelation.swift │ │ │ └── EdgeInsets.swift │ ├── FDFullscreenPopGesture │ │ ├── LICENSE │ │ └── README.md │ ├── AFNetworking │ │ ├── LICENSE │ │ ├── UIKit+AFNetworking │ │ │ ├── UIImage+AFNetworking.h │ │ │ └── UIKit+AFNetworking.h │ │ └── AFNetworking │ │ │ └── AFNetworking.h │ └── UITableView+FDTemplateLayoutCell │ │ ├── LICENSE │ │ └── Classes │ │ ├── UITableView+FDTemplateLayoutCellDebug.h │ │ ├── UITableView+FDKeyedHeightCache.h │ │ └── UITableView+FDTemplateLayoutCellDebug.m ├── .DS_Store ├── SwiftMVVMKitDemo │ ├── .DS_Store │ ├── Images.xcassets │ │ ├── Contents.json │ │ ├── phil.imageset │ │ │ ├── phil.png │ │ │ └── Contents.json │ │ ├── dogebread.imageset │ │ │ ├── dogebread.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Classes │ │ ├── .DS_Store │ │ ├── Src │ │ │ ├── .DS_Store │ │ │ ├── firstExample │ │ │ │ ├── .DS_Store │ │ │ │ ├── Model │ │ │ │ │ └── FirstModel.swift │ │ │ │ ├── ViewModel │ │ │ │ │ └── BQViewModel.swift │ │ │ │ ├── View │ │ │ │ │ └── BQCell.swift │ │ │ │ └── Controller │ │ │ │ │ └── FirstVC.swift │ │ │ ├── thirdExample │ │ │ │ ├── .DS_Store │ │ │ │ ├── View │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── ThirdView.swift │ │ │ │ ├── Model │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── ThirdModel.swift │ │ │ │ ├── ViewModel │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── ThirdViewModel.swift │ │ │ │ ├── Controller │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── ThirdVC.swift │ │ │ │ └── ViewManger │ │ │ │ │ └── ThirdViewManger.swift │ │ │ ├── FourthExample │ │ │ │ ├── .DS_Store │ │ │ │ ├── Model │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── FourthModel.swift │ │ │ │ ├── View │ │ │ │ │ ├── .DS_Store │ │ │ │ │ ├── FourthView │ │ │ │ │ │ ├── FourthView.swift │ │ │ │ │ │ └── FourthView.xib │ │ │ │ │ └── FourthView2 │ │ │ │ │ │ ├── FourthView2.swift │ │ │ │ │ │ └── FourthView2.xib │ │ │ │ ├── Controller │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── FourthVC.swift │ │ │ │ ├── ViewManger │ │ │ │ │ ├── .DS_Store │ │ │ │ │ ├── FourthViewManger │ │ │ │ │ │ └── FourthViewManger.swift │ │ │ │ │ └── FourthViewManger2 │ │ │ │ │ │ └── FourthViewManger2.swift │ │ │ │ └── ViewModel │ │ │ │ │ ├── .DS_Store │ │ │ │ │ └── FourthViewModel.swift │ │ │ └── secondExample │ │ │ │ ├── .DS_Store │ │ │ │ ├── Controller │ │ │ │ ├── .DS_Store │ │ │ │ └── SecondVC.swift │ │ │ │ ├── Model │ │ │ │ └── BQTestModel.swift │ │ │ │ ├── View │ │ │ │ └── BQCollectionCell.swift │ │ │ │ └── ViewModel │ │ │ │ └── BQViewModel2.swift │ │ ├── Expand │ │ │ ├── .DS_Store │ │ │ ├── Custom │ │ │ │ ├── .DS_Store │ │ │ │ ├── Base │ │ │ │ │ └── .DS_Store │ │ │ │ └── Controller │ │ │ │ │ └── BHNavViewController.h │ │ │ ├── Constant │ │ │ │ ├── .DS_Store │ │ │ │ └── ConstantPublicHeader.h │ │ │ ├── Tool │ │ │ │ └── ToolPublicHeader.h │ │ │ ├── Macros │ │ │ │ └── MacrosPublicHeader.h │ │ │ ├── Network │ │ │ │ └── NetworkPublicHeader.h │ │ │ ├── Category │ │ │ │ └── CategoryPublicHeader.h │ │ │ └── DataBase │ │ │ │ └── DataBasePublicHeader.h │ │ ├── Other │ │ │ └── .DS_Store │ │ ├── Utils │ │ │ ├── .DS_Store │ │ │ └── Foundation+Log.m │ │ ├── Vender │ │ │ ├── .DS_Store │ │ │ ├── Library │ │ │ │ ├── .DS_Store │ │ │ │ └── LibraryPublicHeader.h │ │ │ └── SDKFiles │ │ │ │ └── SDKFilePublicHeader.h │ │ └── Resource │ │ │ ├── .DS_Store │ │ │ ├── Global │ │ │ ├── .DS_Store │ │ │ └── SwiftMVVMKit-Bridge-Header.h │ │ │ ├── Image │ │ │ └── .DS_Store │ │ │ └── Plist │ │ │ └── .DS_Store │ ├── SwiftMVVMKit │ │ ├── .DS_Store │ │ ├── Base │ │ │ └── .DS_Store │ │ ├── Extend │ │ │ ├── .DS_Store │ │ │ ├── UITableView+Extension.swift │ │ │ ├── UICollectionView+Extension.swift │ │ │ ├── UIView+Configure.swift │ │ │ ├── UIView+Extension.swift │ │ │ ├── UICollectionViewCell+Extension.swift │ │ │ └── UITableViewCell+Extension.swift │ │ ├── Handler │ │ │ └── .DS_Store │ │ └── Protocol │ │ │ ├── SMKViewProtocolDelegate.swift │ │ │ ├── SMKViewModelProtocolDelegate.swift │ │ │ └── SMKViewMangerProtocolDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── SwiftMVVMKitDemo.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Podfile └── SwiftMVVMKitDemo.xcworkspace │ └── contents.xcworkspacedata ├── .DS_Store ├── SwiftMVVMKit ├── .DS_Store ├── Base │ └── .DS_Store ├── Extend │ ├── .DS_Store │ ├── UITableView+Extension.swift │ ├── UICollectionView+Extension.swift │ ├── UIView+Configure.swift │ ├── UIView+Extension.swift │ ├── UICollectionViewCell+Extension.swift │ └── UITableViewCell+Extension.swift ├── Handler │ └── .DS_Store └── Protocol │ ├── SMKViewProtocolDelegate.swift │ ├── SMKViewModelProtocolDelegate.swift │ └── SMKViewMangerProtocolDelegate.swift ├── .gitignore ├── SwiftMVVMKit.podspec └── LICENSE /SwiftMVVMKitDemo/Pods/Headers/Private/FMDB/FMDB.h: -------------------------------------------------------------------------------- 1 | ../../../FMDB/src/fmdb/FMDB.h -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/FMDB/FMDatabase.h: -------------------------------------------------------------------------------- 1 | ../../../FMDB/src/fmdb/FMDatabase.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/FMDB/FMResultSet.h: -------------------------------------------------------------------------------- 1 | ../../../FMDB/src/fmdb/FMResultSet.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/FMDB/FMDatabasePool.h: -------------------------------------------------------------------------------- 1 | ../../../FMDB/src/fmdb/FMDatabasePool.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/FMDB/FMDatabaseQueue.h: -------------------------------------------------------------------------------- 1 | ../../../FMDB/src/fmdb/FMDatabaseQueue.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefresh.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/MJRefresh.h -------------------------------------------------------------------------------- /SwiftMVVMKit/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKit/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/FMDB/FMDatabaseAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../FMDB/src/fmdb/FMDatabaseAdditions.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/MJProperty.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJProperty.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJExtension.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/MJFoundation.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJFoundation.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/MJPropertyKey.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJPropertyKey.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshConst.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/MJRefreshConst.h -------------------------------------------------------------------------------- /SwiftMVVMKit/Base/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKit/Base/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/MJPropertyType.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJPropertyType.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshHeader.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshHeader.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/UIView+MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/UIView+MJExtension.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMStore/SMKStorePublic.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMStore/SUIMVVMStore/SMKStorePublic.h -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKit/Extend/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKit/Handler/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKit/Handler/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/MJExtensionConst.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJExtensionConst.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/NSObject+MJClass.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJClass.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/NSObject+MJCoding.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJCoding.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshComponent.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshComponent.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMStore/SMKStore.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMStore/SUIMVVMStore/SUIMVVMStore/SMKStore.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/Pods/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/NSObject+MJKeyValue.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJKeyValue.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/NSObject+MJProperty.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJProperty.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJExtension/NSString+MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSString+MJExtension.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshAutoFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshBackFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/UIScrollView+MJRefresh.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/UIScrollView+MJRefresh.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMNetwork/SMKHttp.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKHttp.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMNetwork/SMKNetworkPublic.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMNetwork/SUIMVVMNetwork/SMKNetworkPublic.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FMDB/FMDB-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshGifHeader.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/UIScrollView+MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/UIScrollView+MJExtension.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshNormalHeader.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshStateHeader.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMNetwork/SMKHttpConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKHttpConfig.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMNetwork/SMKSingleton.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKSingleton.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJRefresh/MJRefresh-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMNetwork/SMKDataService.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKDataService.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/SUIMVVMStore/YTKKeyValueStore.h: -------------------------------------------------------------------------------- 1 | ../../../SUIMVVMStore/SUIMVVMStore/YTKKeyValueStore/YTKKeyValueStore.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJExtension/MJExtension-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMStore/SUIMVVMStore-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshAutoGifFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshAutoStateFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshBackGifFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshBackStateFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMNetwork/SUIMVVMNetwork-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshAutoNormalFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/MJRefresh/MJRefreshBackNormalFooter.h: -------------------------------------------------------------------------------- 1 | ../../../MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SwiftExtensionKit/SwiftExtensionKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Other/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Other/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Utils/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Utils/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Vender/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Vender/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/UITableView+FDTemplateLayoutCell/UITableView+FDKeyedHeightCache.h: -------------------------------------------------------------------------------- 1 | ../../../UITableView+FDTemplateLayoutCell/Classes/UITableView+FDKeyedHeightCache.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FMDB/FMDB.modulemap: -------------------------------------------------------------------------------- 1 | framework module FMDB { 2 | umbrella header "FMDB-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/Pods/Pods.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods { 2 | umbrella header "Pods-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Base/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Base/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/UITableView+FDTemplateLayoutCell/UITableView+FDIndexPathHeightCache.h: -------------------------------------------------------------------------------- 1 | ../../../UITableView+FDTemplateLayoutCell/Classes/UITableView+FDIndexPathHeightCache.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.h: -------------------------------------------------------------------------------- 1 | ../../../UITableView+FDTemplateLayoutCell/Classes/UITableView+FDTemplateLayoutCell.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FMDB/FMDB-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FMDB : NSObject 3 | @end 4 | @implementation PodsDummy_FMDB 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Custom/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Custom/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Handler/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Handler/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SnapKit/SnapKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SnapKit { 2 | umbrella header "SnapKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Constant/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Constant/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Global/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Global/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Image/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Image/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Plist/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Plist/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/firstExample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/firstExample/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Vender/Library/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Vender/Library/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCellDebug.h: -------------------------------------------------------------------------------- 1 | ../../../UITableView+FDTemplateLayoutCell/Classes/UITableView+FDTemplateLayoutCellDebug.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Custom/Base/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Custom/Base/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJRefresh/MJRefresh.modulemap: -------------------------------------------------------------------------------- 1 | framework module MJRefresh { 2 | umbrella header "MJRefresh-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/View/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/View/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/phil.imageset/phil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/phil.imageset/phil.png -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Headers/Private/FDFullscreenPopGesture/UINavigationController+FDFullscreenPopGesture.h: -------------------------------------------------------------------------------- 1 | ../../../FDFullscreenPopGesture/FDFullscreenPopGesture/UINavigationController+FDFullscreenPopGesture.h -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJExtension/MJExtension.modulemap: -------------------------------------------------------------------------------- 1 | framework module MJExtension { 2 | umbrella header "MJExtension-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJRefresh/MJRefresh-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MJRefresh : NSObject 3 | @end 4 | @implementation PodsDummy_MJRefresh 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/Model/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/Model/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/View/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/View/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/Model/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/Model/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/AFNetworking/AFNetworking.modulemap: -------------------------------------------------------------------------------- 1 | framework module AFNetworking { 2 | umbrella header "AFNetworking-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/Pods/Pods-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double PodsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char PodsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMStore/SUIMVVMStore.modulemap: -------------------------------------------------------------------------------- 1 | framework module SUIMVVMStore { 2 | umbrella header "SUIMVVMStore-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/ViewModel/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/ViewModel/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJExtension/MJExtension-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MJExtension : NSObject 3 | @end 4 | @implementation PodsDummy_MJExtension 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/Controller/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/Controller/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewManger/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewManger/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewModel/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewModel/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/Controller/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/Controller/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/Controller/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/Controller/.DS_Store -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMNetwork/SUIMVVMNetwork.modulemap: -------------------------------------------------------------------------------- 1 | framework module SUIMVVMNetwork { 2 | umbrella header "SUIMVVMNetwork-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMStore/SUIMVVMStore-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SUIMVVMStore : NSObject 3 | @end 4 | @implementation PodsDummy_SUIMVVMStore 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/dogebread.imageset/dogebread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lovemo/MVVMFramework-Swift/HEAD/SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/dogebread.imageset/dogebread.png -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMNetwork/SUIMVVMNetwork-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SUIMVVMNetwork : NSObject 3 | @end 4 | @implementation PodsDummy_SUIMVVMNetwork 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double SnapKitVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SwiftExtensionKit/SwiftExtensionKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftExtensionKit { 2 | umbrella header "SwiftExtensionKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SwiftExtensionKit/SwiftExtensionKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftExtensionKit : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftExtensionKit 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture.modulemap: -------------------------------------------------------------------------------- 1 | framework module FDFullscreenPopGesture { 2 | umbrella header "FDFullscreenPopGesture-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FDFullscreenPopGesture : NSObject 3 | @end 4 | @implementation PodsDummy_FDFullscreenPopGesture 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SwiftExtensionKit/SwiftExtensionKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double SwiftExtensionKitVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char SwiftExtensionKitVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.modulemap: -------------------------------------------------------------------------------- 1 | framework module UITableView_FDTemplateLayoutCell { 2 | umbrella header "UITableView+FDTemplateLayoutCell-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJRefresh" "${PODS_ROOT}/Headers/Public" 3 | PODS_ROOT = ${SRCROOT} 4 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_UITableView_FDTemplateLayoutCell : NSObject 3 | @end 4 | @implementation PodsDummy_UITableView_FDTemplateLayoutCell 5 | @end 6 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJExtension/MJExtension.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJExtension" "${PODS_ROOT}/Headers/Public" 3 | PODS_ROOT = ${SRCROOT} 4 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FMDB/FMDB.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FMDB" "${PODS_ROOT}/Headers/Public" 3 | OTHER_LDFLAGS = -l"sqlite3" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/Model/FourthModel.swift: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // FourthModel.swift 4 | // SwiftMVVMKitDemo 5 | // 6 | // Created by yuantao on 16/3/7. 7 | // Copyright © 2016年 momo. All rights reserved. 8 | // 9 | 10 | import UIKit 11 | 12 | class FourthModel: NSObject { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FDFullscreenPopGesture" "${PODS_ROOT}/Headers/Public" 3 | PODS_ROOT = ${SRCROOT} 4 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewModel/FourthViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthViewModel.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by Mac on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FourthViewModel: NSObject { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/firstExample/Model/FirstModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstModel.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FirstModel: NSObject { 12 | var title = "" 13 | } 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | use_frameworks! 3 | 4 | pod 'AFNetworking' 5 | pod 'FDFullscreenPopGesture' 6 | pod 'MJExtension' 7 | pod 'SUIMVVMNetwork' 8 | pod 'MJRefresh' 9 | pod 'SwiftExtensionKit' 10 | pod 'UITableView+FDTemplateLayoutCell' 11 | source 'https://github.com/CocoaPods/Specs.git' 12 | pod 'SnapKit' 13 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "UINavigationController+FDFullscreenPopGesture.h" 4 | 5 | FOUNDATION_EXPORT double FDFullscreenPopGestureVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char FDFullscreenPopGestureVersionString[]; 7 | 8 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SnapKit/SnapKit.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SnapKit" "${PODS_ROOT}/Headers/Public" 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshFooter.h" 10 | 11 | @interface MJRefreshBackFooter : MJRefreshFooter 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Tool/ToolPublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ToolPublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef ToolPublicHeader_h 10 | #define ToolPublicHeader_h 11 | 12 | 13 | #endif /* ToolPublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/FMDB/src/fmdb/FMDB.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double FMDBVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char FMDBVersionString[]; 5 | 6 | #import "FMDatabase.h" 7 | #import "FMResultSet.h" 8 | #import "FMDatabaseAdditions.h" 9 | #import "FMDatabaseQueue.h" 10 | #import "FMDatabasePool.h" 11 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMStore/SUIMVVMStore/SMKStorePublic.h: -------------------------------------------------------------------------------- 1 | // 2 | // SMKStorePublic.h 3 | // SUIMVVMStoreDemo 4 | // 5 | // Created by yuantao on 16/3/2. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | #ifndef SMKStorePublic_h 10 | #define SMKStorePublic_h 11 | 12 | #import "SMKStore.h" 13 | 14 | #endif /* SMKStorePublic_h */ 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public" 3 | PODS_ROOT = ${SRCROOT} 4 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Macros/MacrosPublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MacrosPublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef MacrosPublicHeader_h 10 | #define MacrosPublicHeader_h 11 | 12 | 13 | #endif /* MacrosPublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/Model/BQTestModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BQTestModel.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BQTestModel: NSObject { 12 | var title = "" 13 | var ID = "" 14 | } 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/Model/ThirdModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdModel.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ThirdModel: NSObject { 12 | var name = "" 13 | var title = "" 14 | } 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJFoundation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJFoundation.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 14/7/16. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MJFoundation : NSObject 12 | + (BOOL)isClassFromFoundation:(Class)c; 13 | @end 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Network/NetworkPublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkPublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef NetworkPublicHeader_h 10 | #define NetworkPublicHeader_h 11 | 12 | 13 | #endif /* NetworkPublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Vender/Library/LibraryPublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // LibraryPublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef LibraryPublicHeader_h 10 | #define LibraryPublicHeader_h 11 | 12 | 13 | #endif /* LibraryPublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Category/CategoryPublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // CategoryPublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef CategoryPublicHeader_h 10 | #define CategoryPublicHeader_h 11 | 12 | 13 | #endif /* CategoryPublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Constant/ConstantPublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ConstantPublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef ConstantPublicHeader_h 10 | #define ConstantPublicHeader_h 11 | 12 | 13 | #endif /* ConstantPublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/DataBase/DataBasePublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // DataBasePublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef DataBasePublicHeader_h 10 | #define DataBasePublicHeader_h 11 | 12 | 13 | #endif /* DataBasePublicHeader_h */ 14 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Vender/SDKFiles/SDKFilePublicHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // SDKFilePublicHeader.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/6. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #ifndef SDKFilePublicHeader_h 10 | #define SDKFilePublicHeader_h 11 | 12 | 13 | 14 | #endif /* SDKFilePublicHeader_h */ 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FMDB/FMDB-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "FMDatabase.h" 4 | #import "FMDatabaseAdditions.h" 5 | #import "FMDatabasePool.h" 6 | #import "FMDatabaseQueue.h" 7 | #import "FMDB.h" 8 | #import "FMResultSet.h" 9 | 10 | FOUNDATION_EXPORT double FMDBVersionNumber; 11 | FOUNDATION_EXPORT const unsigned char FMDBVersionString[]; 12 | 13 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMNetwork/SUIMVVMNetwork.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SUIMVVMNetwork" "${PODS_ROOT}/Headers/Public" 3 | OTHER_LDFLAGS = -framework "CoreFoundation" -framework "Foundation" -framework "UIKit" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMStore/SUIMVVMStore.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SUIMVVMStore" "${PODS_ROOT}/Headers/Public" 3 | OTHER_LDFLAGS = -l"sqlite3" -framework "CoreFoundation" -framework "Foundation" -framework "UIKit" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Expand/Custom/Controller/BHNavViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BHNavViewController.h 3 | // HarmoniousCommunity 4 | // 5 | // Created by love on 15/11/17. 6 | // Copyright © 2015年 love. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BHNavViewController : UINavigationController 12 | 13 | +(void)setupNavTheme; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Resource/Global/SwiftMVVMKit-Bridge-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftMVVMKit-Bridge-Header.h 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | #ifndef SwiftMVVMKit_Bridge_Header_h 10 | #define SwiftMVVMKit_Bridge_Header_h 11 | 12 | 13 | 14 | #endif /* SwiftMVVMKit_Bridge_Header_h */ 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" 3 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SwiftExtensionKit/SwiftExtensionKit.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SwiftExtensionKit" "${PODS_ROOT}/Headers/Public" 3 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMNetwork/SUIMVVMNetwork/SMKNetworkPublic.h: -------------------------------------------------------------------------------- 1 | // 2 | // SMKNetworkPublic.h 3 | // SUIMVVMNetworkDemo 4 | // 5 | // Created by yuantao on 16/3/2. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | #ifndef SMKNetworkPublic_h 10 | #define SMKNetworkPublic_h 11 | 12 | #import "SMKHttp.h" 13 | #import "SMKHttpConfig.h" 14 | #import "SMKDataService.h" 15 | #import "SMKSingleton.h" 16 | 17 | #endif /* SMKNetworkPublic_h */ 18 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/phil.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "phil.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Images.xcassets/dogebread.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "dogebread.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SwiftExtensionKit/SwiftExtensionKit/SEKUIImageView+Corner.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SEKUIImageView+Corner.swift 3 | // SwiftExtensionKitDemo 4 | // 5 | // Created by yuantao on 16/3/3. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIImageView { 12 | 13 | override public func addCorner(radius radius: CGFloat) { 14 | self.image = self.image?.roundCornerImage(radius: radius, self.bounds.size) 15 | } 16 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoNormalFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoNormalFooter : MJRefreshAutoStateFooter 12 | /** 菊花的样式 */ 13 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 14 | @end 15 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMStore/SUIMVVMStore-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "SMKStorePublic.h" 4 | #import "SMKStore.h" 5 | #import "YTKKeyValueStore.h" 6 | #import "SMKStorePublic.h" 7 | #import "SMKStore.h" 8 | #import "YTKKeyValueStore.h" 9 | #import "SMKStorePublic.h" 10 | #import "SMKStore.h" 11 | #import "YTKKeyValueStore.h" 12 | 13 | FOUNDATION_EXPORT double SUIMVVMStoreVersionNumber; 14 | FOUNDATION_EXPORT const unsigned char SUIMVVMStoreVersionString[]; 15 | 16 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKHttpConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // SMKHttpConfig.h 3 | // SUIMVVMDemo 4 | // 5 | // Created by yuantao on 16/3/2. 6 | // Copyright © 2016年 lovemo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SMKSingleton.h" 11 | 12 | @interface SMKHttpConfig : NSObject 13 | 14 | SMKSingletonH(Config) 15 | 16 | /** 17 | * 网络是否连通 18 | */ 19 | @property(nonatomic, assign, readonly, getter=isReachable) BOOL reachable; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "UITableView+FDIndexPathHeightCache.h" 4 | #import "UITableView+FDKeyedHeightCache.h" 5 | #import "UITableView+FDTemplateLayoutCell.h" 6 | #import "UITableView+FDTemplateLayoutCellDebug.h" 7 | 8 | FOUNDATION_EXPORT double UITableView_FDTemplateLayoutCellVersionNumber; 9 | FOUNDATION_EXPORT const unsigned char UITableView_FDTemplateLayoutCellVersionString[]; 10 | 11 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshNormalHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshStateHeader.h" 10 | 11 | @interface MJRefreshNormalHeader : MJRefreshStateHeader 12 | @property (weak, nonatomic, readonly) UIImageView *arrowView; 13 | /** 菊花的样式 */ 14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 15 | @end 16 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMNetwork/SUIMVVMNetwork-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "SMKNetworkPublic.h" 4 | #import "SMKDataService.h" 5 | #import "SMKHttp.h" 6 | #import "SMKHttpConfig.h" 7 | #import "SMKSingleton.h" 8 | #import "SMKNetworkPublic.h" 9 | #import "SMKDataService.h" 10 | #import "SMKHttp.h" 11 | #import "SMKHttpConfig.h" 12 | #import "SMKSingleton.h" 13 | 14 | FOUNDATION_EXPORT double SUIMVVMNetworkVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SUIMVVMNetworkVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Protocol/SMKViewProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SMKViewProtocolDelegate.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol SMKViewProtocolDelegate: NSObjectProtocol { 12 | 13 | /** 14 | 将view中的事件通过代理传递出去 15 | 16 | - parameter view: view自己 17 | - parameter events: 所触发事件的一些描述信息 18 | */ 19 | optional func smk_view(view: UIView, events: [NSObject : AnyObject]?) 20 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SwiftExtensionKit/README.md: -------------------------------------------------------------------------------- 1 | # SwiftExtensionKit 2 | ![Swift](https://img.shields.io/badge/Swift-2.0-orange.svg) 3 | 4 | SwiftExtensionKit - SwiftExtensionKit is a collection of useful classes to develop Apps faster 5 | 6 | Welcome to join us in the maintenance of the project 7 | 8 | === 9 | usage: 10 | ``` 11 | pod 'SwiftExtensionKit' 12 | ``` 13 | 14 | === 15 | 16 | ##SwiftExtensionKit 17 | - SEKView+Frame 18 | - SEKView+Nib 19 | - SEKView+Corner 20 | - SEKUIImageView+Corner 21 | - SEKUIImage+Extention 22 | 23 | ###update。。。 24 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackNormalFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackNormalFooter : MJRefreshBackStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *arrowView; 13 | /** 菊花的样式 */ 14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 15 | @end 16 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/View/FourthView/FourthView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthView.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FourthView: UIView { 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | override func drawRect(rect: CGRect) { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | } 22 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Protocol/SMKViewProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SMKViewProtocolDelegate.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol SMKViewProtocolDelegate: NSObjectProtocol { 12 | 13 | /** 14 | 将view中的事件通过代理传递出去 15 | 16 | - parameter view: view自己 17 | - parameter events: 所触发事件的一些描述信息 18 | */ 19 | optional func smk_view(view: UIView, events: [NSObject : AnyObject]?) 20 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/View/FourthView2/FourthView2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthView2.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FourthView2: UIView { 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | override func drawRect(rect: CGRect) { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | } 22 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJExtension/MJExtension-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MJExtension.h" 4 | #import "MJExtensionConst.h" 5 | #import "MJFoundation.h" 6 | #import "MJProperty.h" 7 | #import "MJPropertyKey.h" 8 | #import "MJPropertyType.h" 9 | #import "NSObject+MJClass.h" 10 | #import "NSObject+MJCoding.h" 11 | #import "NSObject+MJKeyValue.h" 12 | #import "NSObject+MJProperty.h" 13 | #import "NSString+MJExtension.h" 14 | 15 | FOUNDATION_EXPORT double MJExtensionVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char MJExtensionVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJExtension.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 代码地址:https://github.com/CoderMJLee/MJExtension 8 | // 代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57 9 | 10 | #import "NSObject+MJCoding.h" 11 | #import "NSObject+MJProperty.h" 12 | #import "NSObject+MJClass.h" 13 | #import "NSObject+MJKeyValue.h" 14 | #import "NSString+MJExtension.h" 15 | #import "MJExtensionConst.h" -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | 4 | #import "UIScrollView+MJRefresh.h" 5 | #import "UIScrollView+MJExtension.h" 6 | #import "UIView+MJExtension.h" 7 | 8 | #import "MJRefreshNormalHeader.h" 9 | #import "MJRefreshGifHeader.h" 10 | 11 | #import "MJRefreshBackNormalFooter.h" 12 | #import "MJRefreshBackGifFooter.h" 13 | #import "MJRefreshAutoNormalFooter.h" 14 | #import "MJRefreshAutoGifFooter.h" -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackStateFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackFooter.h" 10 | 11 | @interface MJRefreshBackStateFooter : MJRefreshBackFooter 12 | /** 显示刷新状态的label */ 13 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 14 | /** 设置state状态下的文字 */ 15 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 16 | 17 | /** 获取state状态下的title */ 18 | - (NSString *)titleForState:(MJRefreshState)state; 19 | @end 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshGifHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshStateHeader.h" 10 | 11 | @interface MJRefreshGifHeader : MJRefreshStateHeader 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoGifFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoGifFooter : MJRefreshAutoStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackGifFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackGifFooter : MJRefreshBackStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SwiftExtensionKit/SwiftExtensionKit/SEKUIViewController+Storyboard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SEKUIViewController+Storyboard.swift 3 | // SwiftExtensionKitDemo 4 | // 5 | // Created by yuantao on 16/3/8. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIViewController { 12 | 13 | public class func viewControllerWithStoryboardName(stroryboardName: String, vcIdentifier: String) -> UIViewController { 14 | let sb = UIStoryboard(name: stroryboardName, bundle: NSBundle.mainBundle()) 15 | return sb.instantiateViewControllerWithIdentifier(vcIdentifier) 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoStateFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoFooter.h" 10 | 11 | @interface MJRefreshAutoStateFooter : MJRefreshAutoFooter 12 | /** 显示刷新状态的label */ 13 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 14 | 15 | /** 设置state状态下的文字 */ 16 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 17 | 18 | /** 隐藏刷新状态的文字 */ 19 | @property (assign, nonatomic, getter=isRefreshingTitleHidden) BOOL refreshingTitleHidden; 20 | @end 21 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJPropertyKey.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJPropertyKey.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/8/11. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | MJPropertyKeyTypeDictionary = 0, // 字典的key 13 | MJPropertyKeyTypeArray // 数组的key 14 | } MJPropertyKeyType; 15 | 16 | /** 17 | * 属性的key 18 | */ 19 | @interface MJPropertyKey : NSObject 20 | /** key的名字 */ 21 | @property (copy, nonatomic) NSString *name; 22 | /** key的种类,可能是@"10",可能是@"age" */ 23 | @property (assign, nonatomic) MJPropertyKeyType type; 24 | 25 | /** 26 | * 根据当前的key,也就是name,从object(字典或者数组)中取值 27 | */ 28 | - (id)valueInObject:(id)object; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | 28 | # Carthage 29 | # 30 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 31 | # Carthage/Checkouts 32 | 33 | Carthage/Build 34 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshFooter.h" 10 | 11 | @interface MJRefreshAutoFooter : MJRefreshFooter 12 | /** 是否自动刷新(默认为YES) */ 13 | @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh; 14 | 15 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ 16 | @property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用automaticallyChangeAlpha属性"); 17 | 18 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ 19 | @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent; 20 | @end 21 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJPropertyKey.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJPropertyKey.m 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/8/11. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJPropertyKey.h" 10 | 11 | @implementation MJPropertyKey 12 | 13 | - (id)valueInObject:(id)object 14 | { 15 | if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) { 16 | return object[self.name]; 17 | } else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) { 18 | NSArray *array = object; 19 | NSUInteger index = self.name.intValue; 20 | if (index < array.count) return array[index]; 21 | return nil; 22 | } 23 | return nil; 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/UIView+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIView+Extension.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface UIView (MJExtension) 13 | @property (assign, nonatomic) CGFloat mj_x; 14 | @property (assign, nonatomic) CGFloat mj_y; 15 | @property (assign, nonatomic) CGFloat mj_w; 16 | @property (assign, nonatomic) CGFloat mj_h; 17 | @property (assign, nonatomic) CGSize mj_size; 18 | @property (assign, nonatomic) CGPoint mj_origin; 19 | @end 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshStateHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshHeader.h" 10 | 11 | @interface MJRefreshStateHeader : MJRefreshHeader 12 | #pragma mark - 刷新时间相关 13 | /** 利用这个block来决定显示的更新时间文字 */ 14 | @property (copy, nonatomic) NSString *(^lastUpdatedTimeText)(NSDate *lastUpdatedTime); 15 | /** 显示上一次刷新时间的label */ 16 | @property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel; 17 | 18 | #pragma mark - 状态相关 19 | /** 显示刷新状态的label */ 20 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 21 | /** 设置state状态下的文字 */ 22 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 23 | @end 24 | -------------------------------------------------------------------------------- /SwiftMVVMKit.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'SwiftMVVMKit' 3 | s.version = '0.0.6' 4 | s.summary = 'SwiftMVVMKit is a MVVM frameWork easy to develop iOS' 5 | s.homepage = 'https://github.com/lovemo/MVVMFramework-Swift' 6 | s.platform = :ios, '8.0' 7 | s.license = 'MIT' 8 | s.author = { 'lovemo' => 'lovemomoyulin@qq.com' } 9 | s.source = { :git => 'https://github.com/lovemo/MVVMFramework-Swift.git',:tag => s.version.to_s } 10 | s.source_files = 'SwiftMVVMKit/**/*' 11 | s.requires_arc = true 12 | s.frameworks = 'Foundation', 'UIKit' 13 | 14 | s.dependency 'MJRefresh' 15 | s.dependency 'UITableView+FDTemplateLayoutCell' 16 | 17 | 18 | end 19 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/UITableView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+Extension.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UITableView { 12 | 13 | private struct AssociatedKey { 14 | static var viewExtension = "viewExtension" 15 | } 16 | 17 | var tableHander: SMKBaseTableViewManger { 18 | get { 19 | return objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as! SMKBaseTableViewManger 20 | } 21 | set { 22 | newValue.handleTableViewDatasourceAndDelegate(self) 23 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/UICollectionView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView+Extension.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UICollectionView { 12 | 13 | private struct AssociatedKey { 14 | static var viewExtension = "viewExtension" 15 | } 16 | 17 | var collectionHander: SMKBaseCollectionViewManger { 18 | get { 19 | return objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as! SMKBaseCollectionViewManger 20 | } 21 | set { 22 | newValue.handleCollectionViewDatasourceAndDelegate(self) 23 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/UITableView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+Extension.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UITableView { 12 | 13 | private struct AssociatedKey { 14 | static var viewExtension = "viewExtension" 15 | } 16 | 17 | var tableHander: SMKBaseTableViewManger { 18 | get { 19 | return objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as! SMKBaseTableViewManger 20 | } 21 | set { 22 | newValue.handleTableViewDatasourceAndDelegate(self) 23 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SwiftExtensionKit/SwiftExtensionKit/SEKView+UIViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SEKView+UIViewController.swift 3 | // SwiftExtensionKitDemo 4 | // 5 | // Created by yuantao on 16/3/8. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | public extension UIView { 11 | 12 | /** 13 | 找到当前view所在的viewcontroler 14 | 15 | - returns: UIViewController 16 | */ 17 | public func viewController() -> UIViewController? { 18 | var next: UIView? 19 | for next = self.superview; (next != nil); next = next!.superview { 20 | let nextResponder = next!.nextResponder() 21 | if nextResponder!.isKindOfClass(UIViewController.classForCoder()) { 22 | return nextResponder as? UIViewController 23 | } 24 | } 25 | return nil 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/UICollectionView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView+Extension.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UICollectionView { 12 | 13 | private struct AssociatedKey { 14 | static var viewExtension = "viewExtension" 15 | } 16 | 17 | var collectionHander: SMKBaseCollectionViewManger { 18 | get { 19 | return objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as! SMKBaseCollectionViewManger 20 | } 21 | set { 22 | newValue.handleCollectionViewDatasourceAndDelegate(self) 23 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJRefresh/MJRefresh-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MJRefreshAutoFooter.h" 4 | #import "MJRefreshBackFooter.h" 5 | #import "MJRefreshComponent.h" 6 | #import "MJRefreshFooter.h" 7 | #import "MJRefreshHeader.h" 8 | #import "MJRefreshAutoGifFooter.h" 9 | #import "MJRefreshAutoNormalFooter.h" 10 | #import "MJRefreshAutoStateFooter.h" 11 | #import "MJRefreshBackGifFooter.h" 12 | #import "MJRefreshBackNormalFooter.h" 13 | #import "MJRefreshBackStateFooter.h" 14 | #import "MJRefreshGifHeader.h" 15 | #import "MJRefreshNormalHeader.h" 16 | #import "MJRefreshStateHeader.h" 17 | #import "MJRefresh.h" 18 | #import "MJRefreshConst.h" 19 | #import "UIScrollView+MJExtension.h" 20 | #import "UIScrollView+MJRefresh.h" 21 | #import "UIView+MJExtension.h" 22 | 23 | FOUNDATION_EXPORT double MJRefreshVersionNumber; 24 | FOUNDATION_EXPORT const unsigned char MJRefreshVersionString[]; 25 | 26 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/Controller/ThirdVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdVC.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by Mac on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ThirdVC: UIViewController { 12 | 13 | lazy var thirdViewManger = ThirdViewManger() 14 | lazy var viewModel = ThirdViewModel() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | self.title = "MVVM Example" 20 | thirdViewManger.smk_viewMangerWithSuperView(self.view) 21 | viewModel.smk_viewModelWithGetDataSuccessHandler(nil) 22 | } 23 | 24 | @IBAction func clickBtnAction(sender: UIButton) { 25 | self.thirdViewManger.smk_viewMangerWithModel { () -> [NSObject : AnyObject]? in 26 | return ["model": self.viewModel.getRandomData()!] 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/UIScrollView+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIScrollView+Extension.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface UIScrollView (MJExtension) 13 | @property (assign, nonatomic) CGFloat mj_insetT; 14 | @property (assign, nonatomic) CGFloat mj_insetB; 15 | @property (assign, nonatomic) CGFloat mj_insetL; 16 | @property (assign, nonatomic) CGFloat mj_insetR; 17 | 18 | @property (assign, nonatomic) CGFloat mj_offsetX; 19 | @property (assign, nonatomic) CGFloat mj_offsetY; 20 | 21 | @property (assign, nonatomic) CGFloat mj_contentW; 22 | @property (assign, nonatomic) CGFloat mj_contentH; 23 | @end 24 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/AFNetworking/AFNetworking-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AFNetworking.h" 4 | #import "AFHTTPSessionManager.h" 5 | #import "AFURLSessionManager.h" 6 | #import "AFNetworkReachabilityManager.h" 7 | #import "AFSecurityPolicy.h" 8 | #import "AFURLRequestSerialization.h" 9 | #import "AFURLResponseSerialization.h" 10 | #import "AFAutoPurgingImageCache.h" 11 | #import "AFImageDownloader.h" 12 | #import "AFNetworkActivityIndicatorManager.h" 13 | #import "UIActivityIndicatorView+AFNetworking.h" 14 | #import "UIButton+AFNetworking.h" 15 | #import "UIImage+AFNetworking.h" 16 | #import "UIImageView+AFNetworking.h" 17 | #import "UIKit+AFNetworking.h" 18 | #import "UIProgressView+AFNetworking.h" 19 | #import "UIRefreshControl+AFNetworking.h" 20 | #import "UIWebView+AFNetworking.h" 21 | 22 | FOUNDATION_EXPORT double AFNetworkingVersionNumber; 23 | FOUNDATION_EXPORT const unsigned char AFNetworkingVersionString[]; 24 | 25 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/firstExample/ViewModel/BQViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BQViewModel.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SUIMVVMNetwork 11 | 12 | class BQViewModel: NSObject, SMKViewModelProtocolDelegate { 13 | 14 | func smk_viewModelWithGetDataSuccessHandler(successHandler: ((array: [AnyObject]) -> ())?) { 15 | let url = "http://news-at.zhihu.com/api/4/news/latest" 16 | SMKHttp.get(url, params: nil, success: { (json: AnyObject!) -> Void in 17 | let array = json["stories"] 18 | let models = FirstModel.mj_objectArrayWithKeyValuesArray(array) 19 | if let _ = successHandler { 20 | successHandler!(array: models as [AnyObject]) 21 | } 22 | }) { (error: NSError!) -> Void in 23 | 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/UIView+Configure.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Configure.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | public extension UIView { 11 | 12 | /** 13 | 根据obj配置UIView,设置UIView内容 14 | 15 | - parameter obj: obj description 16 | */ 17 | public func configureViewWithCustomObj(obj: NSObject?) { 18 | 19 | } 20 | 21 | private struct AssociatedKey { 22 | static var viewExtension = "viewExtension" 23 | } 24 | 25 | weak var delegate: SMKViewProtocolDelegate? { 26 | get { 27 | return objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as? SMKViewProtocolDelegate 28 | } 29 | set { 30 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FMDB/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.6 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/Pods/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJRefresh/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SnapKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.19.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/AFNetworking/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.4 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/MJExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.10 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMNetwork/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SUIMVVMStore/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.0.8 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/FDFullscreenPopGesture/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/SwiftExtensionKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.0.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/UIView+Configure.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Configure.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | public extension UIView { 11 | 12 | /** 13 | 根据obj配置UIView,设置UIView内容 14 | 15 | - parameter obj: obj description 16 | */ 17 | public func configureViewWithCustomObj(obj: NSObject?) { 18 | 19 | } 20 | 21 | private struct AssociatedKey { 22 | static var viewExtension = "viewExtension" 23 | } 24 | 25 | weak var delegate: SMKViewProtocolDelegate? { 26 | get { 27 | return objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as? SMKViewProtocolDelegate 28 | } 29 | set { 30 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJExtensionConst.m: -------------------------------------------------------------------------------- 1 | #ifndef __MJExtensionConst__M__ 2 | #define __MJExtensionConst__M__ 3 | 4 | #import 5 | 6 | /** 7 | * 成员变量类型(属性类型) 8 | */ 9 | NSString *const MJPropertyTypeInt = @"i"; 10 | NSString *const MJPropertyTypeShort = @"s"; 11 | NSString *const MJPropertyTypeFloat = @"f"; 12 | NSString *const MJPropertyTypeDouble = @"d"; 13 | NSString *const MJPropertyTypeLong = @"l"; 14 | NSString *const MJPropertyTypeLongLong = @"q"; 15 | NSString *const MJPropertyTypeChar = @"c"; 16 | NSString *const MJPropertyTypeBOOL1 = @"c"; 17 | NSString *const MJPropertyTypeBOOL2 = @"b"; 18 | NSString *const MJPropertyTypePointer = @"*"; 19 | 20 | NSString *const MJPropertyTypeIvar = @"^{objc_ivar=}"; 21 | NSString *const MJPropertyTypeMethod = @"^{objc_method=}"; 22 | NSString *const MJPropertyTypeBlock = @"@?"; 23 | NSString *const MJPropertyTypeClass = @"#"; 24 | NSString *const MJPropertyTypeSEL = @":"; 25 | NSString *const MJPropertyTypeId = @"@"; 26 | 27 | #endif -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.4 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/View/BQCollectionCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BQCollectionCell.swift 3 | // MVVMFramework-Swift 4 | // 5 | // Created by momo on 15/12/29. 6 | // Copyright © 2015年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BQCollectionCell: UICollectionViewCell { 12 | 13 | 14 | @IBOutlet weak var lbTitle: UILabel! 15 | @IBOutlet weak var lbHeight: UILabel! 16 | 17 | override func configure(cell: UICollectionViewCell, customObj obj: AnyObject, indexPath: NSIndexPath) { 18 | let mycell = cell as! BQCollectionCell 19 | mycell.lbTitle.text = "CollectionCell" 20 | mycell.lbHeight.text = "Swift is a powerful and intuitive programming language for iOS, OS X, tvOS, and watchOS. " 21 | } 22 | 23 | override func awakeFromNib() { 24 | super.awakeFromNib() 25 | self.layer.borderColor = UIColor.brownColor().CGColor 26 | self.layer.borderWidth = 2.0; 27 | self.layer.cornerRadius = 5.0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Base/MJRefreshHeader.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshHeader.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/4. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 下拉刷新控件:负责监控用户下拉的状态 9 | 10 | #import "MJRefreshComponent.h" 11 | 12 | @interface MJRefreshHeader : MJRefreshComponent 13 | /** 创建header */ 14 | + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; 15 | /** 创建header */ 16 | + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; 17 | 18 | /** 这个key用来存储上一次下拉刷新成功的时间 */ 19 | @property (copy, nonatomic) NSString *lastUpdatedTimeKey; 20 | /** 上一次下拉刷新成功的时间 */ 21 | @property (strong, nonatomic, readonly) NSDate *lastUpdatedTime; 22 | 23 | /** 忽略多少scrollView的contentInset的top */ 24 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop; 25 | @end 26 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/UIScrollView+MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIScrollView+MJRefresh.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/4. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 给ScrollView增加下拉刷新、上拉刷新的功能 9 | 10 | #import 11 | #import "MJRefreshConst.h" 12 | 13 | @class MJRefreshHeader, MJRefreshFooter; 14 | 15 | @interface UIScrollView (MJRefresh) 16 | /** 下拉刷新控件 */ 17 | @property (strong, nonatomic) MJRefreshHeader *mj_header; 18 | @property (strong, nonatomic) MJRefreshHeader *header MJRefreshDeprecated("使用mj_header"); 19 | /** 上拉刷新控件 */ 20 | @property (strong, nonatomic) MJRefreshFooter *mj_footer; 21 | @property (strong, nonatomic) MJRefreshFooter *footer MJRefreshDeprecated("使用mj_footer"); 22 | 23 | #pragma mark - other 24 | - (NSInteger)mj_totalDataCount; 25 | @property (copy, nonatomic) void (^mj_reloadDataBlock)(NSInteger totalDataCount); 26 | @end 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJPropertyType.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJPropertyType.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 包装一种类型 8 | 9 | #import 10 | 11 | /** 12 | * 包装一种类型 13 | */ 14 | @interface MJPropertyType : NSObject 15 | /** 类型标识符 */ 16 | @property (nonatomic, copy) NSString *code; 17 | 18 | /** 是否为id类型 */ 19 | @property (nonatomic, readonly, getter=isIdType) BOOL idType; 20 | 21 | /** 是否为基本数字类型:int、float等 */ 22 | @property (nonatomic, readonly, getter=isNumberType) BOOL numberType; 23 | 24 | /** 是否为BOOL类型 */ 25 | @property (nonatomic, readonly, getter=isBoolType) BOOL boolType; 26 | 27 | /** 对象类型(如果是基本数据类型,此值为nil) */ 28 | @property (nonatomic, readonly) Class typeClass; 29 | 30 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */ 31 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation; 32 | /** 类型是否不支持KVC */ 33 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled; 34 | 35 | /** 36 | * 获得缓存的类型对象 37 | */ 38 | + (instancetype)cachedTypeWithCode:(NSString *)code; 39 | @end -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 lovemo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/Controller/FourthVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthVC.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FourthVC: UIViewController { 12 | 13 | lazy var fourthViewManger1 = FourthViewManger() 14 | lazy var fourthViewManger2 = FourthViewManger2() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | // 得到父视图 20 | fourthViewManger1.smk_viewMangerWithSuperView(self.view) 21 | fourthViewManger2.smk_viewMangerWithSuperView(self.view) 22 | 23 | // 传入其他Views 24 | fourthViewManger2.smk_viewMangerWithOtherSubViews(["view1": fourthViewManger1.smk_viewMangerOfSubView()]) 25 | } 26 | 27 | override func touchesBegan(touches: Set, withEvent event: UIEvent?) { 28 | // 更新视图block 29 | fourthViewManger1.smk_viewMangerWithLayoutSubViews { () -> () in 30 | self.fourthViewManger2.smk_viewMangerWithUpdateLayoutSubViews() 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/UIView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extension.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/10. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class ClosureWrapper { 12 | var closure: ((events: AnyObject...) -> Void)? 13 | 14 | init(_ closure: ((events: AnyObject...) -> Void)?) { 15 | self.closure = closure 16 | } 17 | } 18 | 19 | public extension UIView { 20 | 21 | /// view中的事件Block 22 | typealias ViewEventsBlock = (events: AnyObject...) -> Void 23 | 24 | private struct AssociatedKey { 25 | static var viewExtension = "viewExtension" 26 | } 27 | 28 | var viewEventsBlock: ViewEventsBlock? { 29 | get { 30 | if let cl = objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as? ClosureWrapper { 31 | return cl.closure 32 | } 33 | return nil 34 | } 35 | set { 36 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, ClosureWrapper(newValue), objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMNetwork/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 lovemo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMStore/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 lovemo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SnapKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SwiftExtensionKit/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 lovemo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/FDFullscreenPopGesture/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/ViewModel/BQViewModel2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BQViewModel2.swift 3 | // MVVMFramework-Swift 4 | // 5 | // Created by momo on 15/12/29. 6 | // Copyright © 2015年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SUIMVVMNetwork 11 | import MJExtension 12 | 13 | class BQViewModel2: NSObject, SMKViewModelProtocolDelegate { 14 | 15 | func smk_viewModelWithGetDataSuccessHandler(successHandler: ((array: [AnyObject]) -> ())?) { 16 | let url = "http://news-at.zhihu.com/api/4/news/latest" 17 | SMKHttp.get(url, params: nil, success: { (json: AnyObject!) -> Void in 18 | 19 | let array = json["stories"] 20 | BQTestModel.mj_setupReplacedKeyFromPropertyName({ () -> [NSObject : AnyObject]! in 21 | return ["ID": "id"] 22 | }) 23 | let models = BQTestModel.mj_objectArrayWithKeyValuesArray(array) 24 | if let _ = successHandler { 25 | successHandler!(array: models as [AnyObject]) 26 | } 27 | 28 | }) { (_) -> Void in 29 | 30 | } 31 | 32 | } 33 | 34 | } 35 | 36 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/NSObject+MJCoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MJCoding.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MJExtensionConst.h" 11 | 12 | /** 13 | * Codeing协议 14 | */ 15 | @protocol MJCoding 16 | @optional 17 | /** 18 | * 这个数组中的属性名才会进行归档 19 | */ 20 | + (NSArray *)mj_allowedCodingPropertyNames; 21 | /** 22 | * 这个数组中的属性名将会被忽略:不进行归档 23 | */ 24 | + (NSArray *)mj_ignoredCodingPropertyNames; 25 | @end 26 | 27 | @interface NSObject (MJCoding) 28 | /** 29 | * 解码(从文件中解析对象) 30 | */ 31 | - (void)mj_decode:(NSCoder *)decoder; 32 | /** 33 | * 编码(将对象写入文件中) 34 | */ 35 | - (void)mj_encode:(NSCoder *)encoder; 36 | @end 37 | 38 | /** 39 | 归档的实现 40 | */ 41 | #define MJCodingImplementation \ 42 | - (id)initWithCoder:(NSCoder *)decoder \ 43 | { \ 44 | if (self = [super init]) { \ 45 | [self mj_decode:decoder]; \ 46 | } \ 47 | return self; \ 48 | } \ 49 | \ 50 | - (void)encodeWithCoder:(NSCoder *)encoder \ 51 | { \ 52 | [self mj_encode:encoder]; \ 53 | } 54 | 55 | #define MJExtensionCodingImplementation MJCodingImplementation -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 MJExtension (https://github.com/CoderMJLee/MJExtension) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKDataService.h: -------------------------------------------------------------------------------- 1 | // 2 | // SMKDataService.h 3 | // MVVMFramework 4 | // 5 | // Created by Mac on 16/1/22. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SMKHttp.h" 11 | 12 | @interface SMKDataService : NSObject 13 | 14 | /** 15 | GET请求转模型 16 | */ 17 | + (void)get:(NSString *)url param:(id)param cachePolicy:(SMKHttpRequestCachePolicy)cachePolicy modelClass:(Class)modelClass responseBlock:(responseBlock)responseDataBlock; 18 | 19 | /** 20 | POST请求转模型 21 | */ 22 | + (void)post:(NSString *)url param:(id)param cachePolicy:(SMKHttpRequestCachePolicy)cachePolicy modelClass:(Class)modelClass responseBlock:(responseBlock)responseDataBlock; 23 | 24 | 25 | + (void)put:(NSString *)url param:(id)param modelClass:(Class)modelClass responseBlock:(responseBlock)responseDataBlock; 26 | 27 | + (void)deleteWithUrl:(NSString *)url param:(id)param modelClass:(Class)modelClass responseBlock:(responseBlock)responseDataBlock; 28 | 29 | /** 30 | 数组、字典转模型,提供给子类的接口 31 | */ 32 | + (id)modelTransformationWithResponseObj:(id)responseObj modelClass:(Class)modelClass; 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/UITableView+FDTemplateLayoutCell/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/UIView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extension.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/10. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class ClosureWrapper { 12 | var closure: ((events: AnyObject...) -> Void)? 13 | 14 | init(_ closure: ((events: AnyObject...) -> Void)?) { 15 | self.closure = closure 16 | } 17 | } 18 | 19 | public extension UIView { 20 | 21 | /// view中的事件Block 22 | typealias ViewEventsBlock = (events: AnyObject...) -> Void 23 | 24 | private struct AssociatedKey { 25 | static var viewExtension = "viewExtension" 26 | } 27 | 28 | var viewEventsBlock: ViewEventsBlock? { 29 | get { 30 | if let cl = objc_getAssociatedObject(self, &AssociatedKey.viewExtension) as? ClosureWrapper { 31 | return cl.closure 32 | } 33 | return nil 34 | } 35 | set { 36 | objc_setAssociatedObject(self, &AssociatedKey.viewExtension, ClosureWrapper(newValue), objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshFooter.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/5. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 上拉刷新控件 9 | 10 | #import "MJRefreshComponent.h" 11 | 12 | @interface MJRefreshFooter : MJRefreshComponent 13 | /** 创建footer */ 14 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; 15 | /** 创建footer */ 16 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; 17 | 18 | /** 提示没有更多的数据 */ 19 | - (void)endRefreshingWithNoMoreData; 20 | - (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData"); 21 | 22 | /** 重置没有更多的数据(消除没有更多数据的状态) */ 23 | - (void)resetNoMoreData; 24 | 25 | /** 忽略多少scrollView的contentInset的bottom */ 26 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom; 27 | 28 | /** 自动根据有无数据来显示和隐藏(有数据就显示,没有数据隐藏。默认是NO) */ 29 | @property (assign, nonatomic, getter=isAutomaticallyHidden) BOOL automaticallyHidden; 30 | @end 31 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SnapKit/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | SnapKit is a DSL to make Auto Layout easy on both iOS and OS X. 4 | 5 | [![Build Status](https://travis-ci.org/SnapKit/SnapKit.svg)](https://travis-ci.org/SnapKit/SnapKit) 6 | [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SnapKit.svg)](https://img.shields.io/cocoapods/v/SnapKit.svg) 7 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 8 | 9 | ```swift 10 | import SnapKit 11 | 12 | class MyViewController: UIViewController { 13 | 14 | lazy var box = UIView() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | self.view.addSubview(box) 20 | box.snp_makeConstraints { (make) -> Void in 21 | make.width.height.equalTo(50) 22 | make.center.equalTo(self.view) 23 | } 24 | } 25 | 26 | } 27 | ``` 28 | 29 | ## Resources 30 | 31 | * [Documentation](http://snapkit.io/docs/) 32 | * [F.A.Q.](http://snapkit.io/faq/) 33 | * [Legacy Platforms (iOS 7.0, OS X 10.9)](http://snapkit.io/legacy-platforms/) 34 | 35 | ## License 36 | 37 | MIT license. See the `LICENSE` file for details. 38 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/NSString+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MJExtension.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/6/7. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MJExtensionConst.h" 11 | 12 | @interface NSString (MJExtension) 13 | /** 14 | * 驼峰转下划线(loveYou -> love_you) 15 | */ 16 | - (NSString *)mj_underlineFromCamel; 17 | /** 18 | * 下划线转驼峰(love_you -> loveYou) 19 | */ 20 | - (NSString *)mj_camelFromUnderline; 21 | /** 22 | * 首字母变大写 23 | */ 24 | - (NSString *)mj_firstCharUpper; 25 | /** 26 | * 首字母变小写 27 | */ 28 | - (NSString *)mj_firstCharLower; 29 | 30 | - (BOOL)mj_isPureInt; 31 | 32 | - (NSURL *)mj_url; 33 | @end 34 | 35 | @interface NSString (MJExtensionDeprecated_v_2_5_16) 36 | - (NSString *)underlineFromCamel MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***"); 37 | - (NSString *)camelFromUnderline MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***"); 38 | - (NSString *)firstCharUpper MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***"); 39 | - (NSString *)firstCharLower MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***"); 40 | - (BOOL)isPureInt MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***"); 41 | - (NSURL *)url MJExtensionDeprecated("请在方法名前面加上mj_前缀,使用mj_***"); 42 | @end 43 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/ViewModel/ThirdViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdViewModel.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by Mac on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SUIMVVMNetwork 11 | 12 | class ThirdViewModel: NSObject, SMKViewModelProtocolDelegate { 13 | 14 | lazy var smk_dataArrayList = [] 15 | 16 | internal func getRandomData() -> NSObject? { 17 | if smk_dataArrayList.count > 0 { 18 | let index = arc4random_uniform(UInt32(self.smk_dataArrayList.count)) 19 | return smk_dataArrayList[Int(index)] as? NSObject 20 | } 21 | return nil 22 | } 23 | 24 | func smk_viewModelWithGetDataSuccessHandler(successHandler: ((array: [AnyObject]) -> ())?) { 25 | let url = "http://news-at.zhihu.com/api/4/news/latest" 26 | SMKHttp.get(url, params: nil, success: { (json: AnyObject!) -> Void in 27 | let array = json["stories"] 28 | self.smk_dataArrayList = ThirdModel.mj_objectArrayWithKeyValuesArray(array) 29 | if let _ = successHandler { 30 | successHandler!(array: self.smk_dataArrayList as [AnyObject]) 31 | } 32 | }) { (_) -> Void in 33 | 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/firstExample/View/BQCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BQCell.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BQCell: UITableViewCell { 12 | 13 | @IBOutlet weak var lbTitle: UILabel! 14 | @IBOutlet weak var lbHeight: UILabel! 15 | @IBOutlet weak var contentImage: UIImageView! 16 | 17 | override func configure(cell: UITableViewCell, customObj obj: AnyObject, indexPath: NSIndexPath) { 18 | let model = obj as! FirstModel 19 | self.lbTitle.text = model.title 20 | 21 | let lengthStr = "Swift is a powerful and intuitive programming language for iOS, OS X, tvOS, and watchOS. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next project — or addition into your current app — because Swift code works side-by-side with Objective-C." 22 | 23 | let shortStr = "Swift. A modern programming language that is safe, fast, and interactive." 24 | 25 | self.lbHeight.text = ((indexPath.row) % 2 == 0) ? lengthStr : shortStr 26 | self.contentImage.image = ((indexPath.row) % 2 == 0) ? UIImage(named: "phil") : UIImage(named: "dogebread") 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/AFNetworking.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/FDFullscreenPopGesture.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/FMDB.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/MJExtension.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/MJRefresh.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SUIMVVMNetwork.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SUIMVVMStore.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SnapKit.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SwiftExtensionKit.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/UITableView_FDTemplateLayoutCell.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "AFNetworking" -framework "FDFullscreenPopGesture" -framework "FMDB" -framework "MJExtension" -framework "MJRefresh" -framework "SUIMVVMNetwork" -framework "SUIMVVMStore" -framework "SnapKit" -framework "SwiftExtensionKit" -framework "UITableView_FDTemplateLayoutCell" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/AFNetworking.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/FDFullscreenPopGesture.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/FMDB.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/MJExtension.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/MJRefresh.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SUIMVVMNetwork.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SUIMVVMStore.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SnapKit.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SwiftExtensionKit.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/UITableView_FDTemplateLayoutCell.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "AFNetworking" -framework "FDFullscreenPopGesture" -framework "FMDB" -framework "MJExtension" -framework "MJRefresh" -framework "SUIMVVMNetwork" -framework "SUIMVVMStore" -framework "SnapKit" -framework "SwiftExtensionKit" -framework "UITableView_FDTemplateLayoutCell" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/View/ThirdView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdView.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ThirdView: UIView { 12 | 13 | @IBOutlet weak var testLabel: UILabel! 14 | 15 | // 按钮事件 <自定义方法> 16 | @IBAction func testBtnClick(sender: UIButton) { 17 | // // 传递事件 18 | // if let _ = delegate { 19 | // if delegate!.respondsToSelector(Selector("smk_view:events:")) { 20 | // delegate?.smk_view?(self, events: ["click": "btn"]) 21 | // } 22 | // } 23 | // 传递事件 24 | if let _ = viewEventsBlock { 25 | viewEventsBlock!(events: "clicked","me") 26 | } 27 | } 28 | 29 | // 按钮事件 <遵循协议代理方法> 30 | @IBAction func jumpOtherVC(sender: UIButton) { 31 | // 传递事件 32 | if let _ = delegate { 33 | if delegate!.respondsToSelector(Selector("smk_view:events:")) { 34 | delegate?.smk_view?(self, events: ["jump": "vc"]) 35 | } 36 | } 37 | 38 | } 39 | 40 | // 根据模型数据配置View 41 | 42 | override func configureViewWithCustomObj(obj: NSObject?) { 43 | if let _ = obj { 44 | let thirdModel = obj as? ThirdModel 45 | testLabel.text = thirdModel!.title; 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Protocol/SMKViewModelProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SMKViewModelProtocolDelegate.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | @objc public protocol SMKViewModelProtocolDelegate: NSObjectProtocol { 12 | 13 | /** 14 | 用来判断是否加载成功,方便外部根据不同需求处理 (外部使用) 15 | 16 | - parameter successHandler: successHandler description 17 | 18 | - returns: return value description 19 | */ 20 | optional func smk_viewModelWithGetDataSuccessHandler(successHandler: ((array: [AnyObject]) -> ( ))?) -> Void 21 | 22 | /** 23 | 返回指定indexPath的item 24 | 25 | - parameter indexPath: indexPath description 26 | 27 | - returns: return value description 28 | */ 29 | optional func smk_viewModelWithIndexPath(indexPath: NSIndexPath) -> NSObject 30 | 31 | /** 32 | 每组中显示多少行 (用于tableView) 33 | 34 | - parameter section: section description 35 | 36 | - returns: return value description 37 | */ 38 | optional func smk_viewModelWithNumberOfRowsInSection(section: Int) -> Int 39 | 40 | /** 41 | 每组中显示多少个 (用于collectionView) 42 | 43 | - parameter section: section description 44 | 45 | - returns: return value description 46 | */ 47 | optional func smk_viewModelWithNumberOfItemsInSection(section: Int) -> Int 48 | 49 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/View/FourthView/FourthView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/View/FourthView2/FourthView2.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Utils/Foundation+Log.m: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @implementation NSDictionary (Log) 5 | - (NSString *)descriptionWithLocale:(id)locale 6 | { 7 | NSMutableString *str = [NSMutableString string]; 8 | 9 | [str appendString:@"{\n"]; 10 | 11 | // 遍历字典的所有键值对 12 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 13 | [str appendFormat:@"\t%@ = %@,\n", key, obj]; 14 | }]; 15 | 16 | [str appendString:@"}"]; 17 | 18 | // 查出最后一个,的范围 19 | NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch]; 20 | if (range.length != 0) { 21 | // 删掉最后一个, 22 | [str deleteCharactersInRange:range]; 23 | } 24 | 25 | return str; 26 | } 27 | @end 28 | 29 | @implementation NSArray (Log) 30 | - (NSString *)descriptionWithLocale:(id)locale 31 | { 32 | NSMutableString *str = [NSMutableString string]; 33 | 34 | [str appendString:@"[\n"]; 35 | 36 | // 遍历数组的所有元素 37 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 38 | [str appendFormat:@"%@,\n", obj]; 39 | }]; 40 | 41 | [str appendString:@"]"]; 42 | 43 | // 查出最后一个,的范围 44 | NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch]; 45 | if (range.length != 0) { 46 | // 删掉最后一个, 47 | [str deleteCharactersInRange:range]; 48 | } 49 | 50 | return str; 51 | } 52 | @end 53 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Protocol/SMKViewModelProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SMKViewModelProtocolDelegate.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | @objc public protocol SMKViewModelProtocolDelegate: NSObjectProtocol { 12 | 13 | /** 14 | 用来判断是否加载成功,方便外部根据不同需求处理 (外部使用) 15 | 16 | - parameter successHandler: successHandler description 17 | 18 | - returns: return value description 19 | */ 20 | optional func smk_viewModelWithGetDataSuccessHandler(successHandler: ((array: [AnyObject]) -> ( ))?) -> Void 21 | 22 | /** 23 | 返回指定indexPath的item 24 | 25 | - parameter indexPath: indexPath description 26 | 27 | - returns: return value description 28 | */ 29 | optional func smk_viewModelWithIndexPath(indexPath: NSIndexPath) -> NSObject 30 | 31 | /** 32 | 每组中显示多少行 (用于tableView) 33 | 34 | - parameter section: section description 35 | 36 | - returns: return value description 37 | */ 38 | optional func smk_viewModelWithNumberOfRowsInSection(section: Int) -> Int 39 | 40 | /** 41 | 每组中显示多少个 (用于collectionView) 42 | 43 | - parameter section: section description 44 | 45 | - returns: return value description 46 | */ 47 | optional func smk_viewModelWithNumberOfItemsInSection(section: Int) -> Int 48 | 49 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AFNetworking.h 3 | // 4 | // 5 | // Created by Paulo Ferreira on 08/07/15. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import 28 | 29 | @interface UIImage (AFNetworking) 30 | 31 | + (UIImage*) safeImageWithData:(NSData*)data; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/FMDB/LICENSE.txt: -------------------------------------------------------------------------------- 1 | If you are using FMDB in your project, I'd love to hear about it. Let Gus know 2 | by sending an email to gus@flyingmeat.com. 3 | 4 | And if you happen to come across either Gus Mueller or Rob Ryan in a bar, you 5 | might consider purchasing a drink of their choosing if FMDB has been useful to 6 | you. 7 | 8 | Finally, and shortly, this is the MIT License. 9 | 10 | Copyright (c) 2008-2014 Flying Meat Inc. 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining a copy 13 | of this software and associated documentation files (the "Software"), to deal 14 | in the Software without restriction, including without limitation the rights 15 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | copies of the Software, and to permit persons to whom the Software is 17 | furnished to do so, subject to the following conditions: 18 | 19 | The above copyright notice and this permission notice shall be included in 20 | all copies or substantial portions of the Software. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 | THE SOFTWARE. -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/MJRefreshConst.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | #import 4 | 5 | const CGFloat MJRefreshHeaderHeight = 54.0; 6 | const CGFloat MJRefreshFooterHeight = 44.0; 7 | const CGFloat MJRefreshFastAnimationDuration = 0.25; 8 | const CGFloat MJRefreshSlowAnimationDuration = 0.4; 9 | 10 | NSString *const MJRefreshKeyPathContentOffset = @"contentOffset"; 11 | NSString *const MJRefreshKeyPathContentInset = @"contentInset"; 12 | NSString *const MJRefreshKeyPathContentSize = @"contentSize"; 13 | NSString *const MJRefreshKeyPathPanState = @"state"; 14 | 15 | NSString *const MJRefreshHeaderLastUpdatedTimeKey = @"MJRefreshHeaderLastUpdatedTimeKey"; 16 | 17 | NSString *const MJRefreshHeaderIdleText = @"下拉可以刷新"; 18 | NSString *const MJRefreshHeaderPullingText = @"松开立即刷新"; 19 | NSString *const MJRefreshHeaderRefreshingText = @"正在刷新数据中..."; 20 | 21 | NSString *const MJRefreshAutoFooterIdleText = @"点击或上拉加载更多"; 22 | NSString *const MJRefreshAutoFooterRefreshingText = @"正在加载更多的数据..."; 23 | NSString *const MJRefreshAutoFooterNoMoreDataText = @"已经全部加载完毕"; 24 | 25 | NSString *const MJRefreshBackFooterIdleText = @"上拉可以加载更多"; 26 | NSString *const MJRefreshBackFooterPullingText = @"松开立即加载更多"; 27 | NSString *const MJRefreshBackFooterRefreshingText = @"正在加载更多的数据..."; 28 | NSString *const MJRefreshBackFooterNoMoreDataText = @"已经全部加载完毕"; -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJProperty.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/4/17. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 包装一个成员属性 8 | 9 | #import 10 | #import 11 | #import "MJPropertyType.h" 12 | #import "MJPropertyKey.h" 13 | 14 | /** 15 | * 包装一个成员 16 | */ 17 | @interface MJProperty : NSObject 18 | /** 成员属性 */ 19 | @property (nonatomic, assign) objc_property_t property; 20 | /** 成员属性的名字 */ 21 | @property (nonatomic, readonly) NSString *name; 22 | 23 | /** 成员属性的类型 */ 24 | @property (nonatomic, readonly) MJPropertyType *type; 25 | /** 成员属性来源于哪个类(可能是父类) */ 26 | @property (nonatomic, assign) Class srcClass; 27 | 28 | /**** 同一个成员属性 - 父类和子类的行为可能不一致(originKey、propertyKeys、objectClassInArray) ****/ 29 | /** 设置最原始的key */ 30 | - (void)setOriginKey:(id)originKey forClass:(Class)c; 31 | /** 对应着字典中的多级key(里面存放的数组,数组里面都是MJPropertyKey对象) */ 32 | - (NSArray *)propertyKeysForClass:(Class)c; 33 | 34 | /** 模型数组中的模型类型 */ 35 | - (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c; 36 | - (Class)objectClassInArrayForClass:(Class)c; 37 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/ 38 | 39 | /** 40 | * 设置object的成员变量值 41 | */ 42 | - (void)setValue:(id)value forObject:(id)object; 43 | /** 44 | * 得到object的成员属性值 45 | */ 46 | - (id)valueForObject:(id)object; 47 | 48 | /** 49 | * 初始化 50 | */ 51 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Assets.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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/MJFoundation.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJFoundation.m 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 14/7/16. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJFoundation.h" 10 | #import "MJExtensionConst.h" 11 | #import 12 | 13 | static NSSet *foundationClasses_; 14 | 15 | @implementation MJFoundation 16 | 17 | + (NSSet *)foundationClasses 18 | { 19 | if (foundationClasses_ == nil) { 20 | // 集合中没有NSObject,因为几乎所有的类都是继承自NSObject,具体是不是NSObject需要特殊判断 21 | foundationClasses_ = [NSSet setWithObjects: 22 | [NSURL class], 23 | [NSDate class], 24 | [NSValue class], 25 | [NSData class], 26 | [NSError class], 27 | [NSArray class], 28 | [NSDictionary class], 29 | [NSString class], 30 | [NSAttributedString class], nil]; 31 | } 32 | return foundationClasses_; 33 | } 34 | 35 | + (BOOL)isClassFromFoundation:(Class)c 36 | { 37 | if (c == [NSObject class] || c == [NSManagedObject class]) return YES; 38 | 39 | __block BOOL result = NO; 40 | [[self foundationClasses] enumerateObjectsUsingBlock:^(Class foundationClass, BOOL *stop) { 41 | if ([c isSubclassOfClass:foundationClass]) { 42 | result = YES; 43 | *stop = YES; 44 | } 45 | }]; 46 | return result; 47 | } 48 | @end 49 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewManger/FourthViewManger/FourthViewManger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthViewManger.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SnapKit 11 | 12 | class FourthViewManger: NSObject, SMKViewMangerProtocolDelegate { 13 | 14 | lazy var fourthView = FourthView.loadInstanceFromNib() 15 | 16 | // 得到自己所管理subView的父视图,并添加到父视图上 17 | func smk_viewMangerWithSuperView(superView: UIView) { 18 | superView.addSubview(fourthView) 19 | 20 | fourthView.snp_makeConstraints { (make) -> Void in 21 | make.size.equalTo(CGSizeMake(100, 100)) 22 | make.centerY.equalTo(superView).offset(-100) 23 | make.left.equalTo(60) 24 | } 25 | 26 | } 27 | 28 | // 返回自己所管理的View,降低耦合性 29 | func smk_viewMangerOfSubView() -> UIView { 30 | return fourthView 31 | } 32 | 33 | // 根据model的变化重新布局自己所管理的字视图的位置,并用block回调给控制器 34 | func smk_viewMangerWithLayoutSubViews(updateBlock: (() -> ())?) { 35 | let leftLength = CGFloat(arc4random_uniform(100) + 20) 36 | let heightLength = CGFloat(arc4random_uniform(150) + 20) 37 | 38 | fourthView.snp_updateConstraints { (make) -> Void in 39 | make.left.equalTo(leftLength) 40 | make.height.equalTo(heightLength) 41 | } 42 | 43 | fourthView.setNeedsLayout() 44 | UIView.animateWithDuration(0.5) { () -> Void in 45 | self.fourthView.layoutIfNeeded() 46 | } 47 | if let _ = updateBlock { 48 | updateBlock!() 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/UICollectionViewCell+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewCell+Extension.swift 3 | // MVVMFramework-Swift 4 | // 5 | // Created by momo on 15/12/29. 6 | // Copyright © 2015年 momo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public extension UICollectionViewCell { 13 | 14 | class func nibWithIdentifier(identifier: String) -> UINib{ 15 | return UINib(nibName: identifier, bundle: nil) 16 | } 17 | 18 | /** 19 | 从nib文件中根据重用标识符注册UICollectionViewcell 20 | 21 | - parameter table: table description 22 | - parameter identifier: identifier description 23 | */ 24 | class func registerTable(table: UICollectionView, nibIdentifier identifier: String) { 25 | return table.registerNib(self.nibWithIdentifier(identifier), forCellWithReuseIdentifier: identifier) 26 | } 27 | 28 | /** 29 | 配置UICollectionViewcell,设置UICollectionViewcell内容 30 | 31 | - parameter cell: cell description 32 | - parameter obj: obj description 33 | - parameter indexPath: indexPath description 34 | */ 35 | func configure(cell: UICollectionViewCell, customObj obj: AnyObject, indexPath: NSIndexPath) { 36 | // Rewrite this func in SubClass ! 37 | } 38 | 39 | /** 40 | 获取自定义对象的cell高度 41 | 42 | - parameter obj: obj description 43 | - parameter indexPath: indexPath description 44 | 45 | - returns: return value description 46 | */ 47 | class func getCellHeightWithCustomObj(obj: AnyObject?, indexPath: NSIndexPath) -> CGFloat { 48 | // Rewrite this func in SubClass if necessary 49 | return obj == nil ? 44.0 : 0.0 // default cell height 44.0 50 | } 51 | } -------------------------------------------------------------------------------- /SwiftMVVMKit/Extend/UITableViewCell+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewCell+Extension.swift 3 | // MVVMFramework-Swift 4 | // 5 | // Created by momo on 15/12/29. 6 | // Copyright © 2015年 momo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public extension UITableViewCell { 13 | 14 | class internal func nibWithIdentifier(identifier: String) -> UINib{ 15 | return UINib(nibName: identifier, bundle: nil) 16 | } 17 | 18 | /** 19 | 从nib文件中根据重用标识符注册UITableViewCell 20 | 21 | - parameter table: table description 22 | - parameter identifier: identifier description 23 | */ 24 | class func registerTable(table: UITableView, nibIdentifier identifier: String) { 25 | return table.registerNib(self.nibWithIdentifier(identifier), forCellReuseIdentifier: identifier) 26 | } 27 | 28 | /** 29 | 配置UITableViewCell,设置UITableViewCell内容 30 | 31 | - parameter cell: cell description 32 | - parameter obj: obj description 33 | - parameter indexPath: indexPath description 34 | */ 35 | func configure(cell: UITableViewCell, customObj obj: AnyObject, indexPath: NSIndexPath) { 36 | // Rewrite this func in SubClass ! 37 | } 38 | 39 | /** 40 | 获取自定义对象的cell高度 (已集成UITableView+FDTemplateLayoutCell,现在创建的cell自动计算高度) 41 | 42 | - parameter obj: obj description 43 | - parameter indexPath: indexPath description 44 | 45 | - returns: return value description 46 | */ 47 | class func getCellHeightWithCustomObj(obj: AnyObject?, indexPath: NSIndexPath) -> CGFloat { 48 | // Rewrite this func in SubClass if necessary 49 | return obj == nil ? 44.0 : 0.0 // default cell height 44.0 50 | } 51 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/FourthExample/ViewManger/FourthViewManger2/FourthViewManger2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthViewManger2.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FourthViewManger2: NSObject, SMKViewMangerProtocolDelegate { 12 | 13 | lazy var fourthView2 = FourthView2.loadInstanceFromNib() 14 | lazy var fourthView = UIView() 15 | 16 | func smk_viewMangerWithSuperView(superView: UIView) { 17 | superView.addSubview(fourthView2) 18 | } 19 | 20 | // 根据自身需要得到外界的视图view 21 | func smk_viewMangerWithOtherSubViews(viewInfos: [NSObject : AnyObject]?) { 22 | 23 | let view1 = viewInfos!["view1"] as! UIView 24 | fourthView = view1 25 | 26 | fourthView2.snp_makeConstraints { (make) -> Void in 27 | make.size.equalTo(CGSizeMake(250, 250)); 28 | make.top.equalTo(view1.snp_bottom).offset(20); 29 | make.left.equalTo(view1); 30 | } 31 | 32 | } 33 | 34 | // 根据外界view或model的变化重新布局自己所管理的字视图的位置 35 | func smk_viewMangerWithUpdateLayoutSubViews() { 36 | let offset = CGFloat(arc4random_uniform(70) + 10) 37 | let wh = CGFloat(arc4random_uniform(200) + 50) 38 | let size = CGSizeMake(wh, wh) 39 | 40 | fourthView2.snp_updateConstraints { (make) -> Void in 41 | make.top.equalTo(self.fourthView.snp_bottom).offset(offset); 42 | make.size.equalTo(size); 43 | } 44 | 45 | fourthView2.setNeedsLayout() 46 | UIView.animateWithDuration(0.5) { () -> Void in 47 | self.fourthView2.layoutIfNeeded() 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/UICollectionViewCell+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewCell+Extension.swift 3 | // MVVMFramework-Swift 4 | // 5 | // Created by momo on 15/12/29. 6 | // Copyright © 2015年 momo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public extension UICollectionViewCell { 13 | 14 | class func nibWithIdentifier(identifier: String) -> UINib{ 15 | return UINib(nibName: identifier, bundle: nil) 16 | } 17 | 18 | /** 19 | 从nib文件中根据重用标识符注册UICollectionViewcell 20 | 21 | - parameter table: table description 22 | - parameter identifier: identifier description 23 | */ 24 | class func registerTable(table: UICollectionView, nibIdentifier identifier: String) { 25 | return table.registerNib(self.nibWithIdentifier(identifier), forCellWithReuseIdentifier: identifier) 26 | } 27 | 28 | /** 29 | 配置UICollectionViewcell,设置UICollectionViewcell内容 30 | 31 | - parameter cell: cell description 32 | - parameter obj: obj description 33 | - parameter indexPath: indexPath description 34 | */ 35 | func configure(cell: UICollectionViewCell, customObj obj: AnyObject, indexPath: NSIndexPath) { 36 | // Rewrite this func in SubClass ! 37 | } 38 | 39 | /** 40 | 获取自定义对象的cell高度 41 | 42 | - parameter obj: obj description 43 | - parameter indexPath: indexPath description 44 | 45 | - returns: return value description 46 | */ 47 | class func getCellHeightWithCustomObj(obj: AnyObject?, indexPath: NSIndexPath) -> CGFloat { 48 | // Rewrite this func in SubClass if necessary 49 | return obj == nil ? 44.0 : 0.0 // default cell height 44.0 50 | } 51 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | #import 26 | 27 | #ifndef _AFNETWORKING_ 28 | #define _AFNETWORKING_ 29 | 30 | #import "AFURLRequestSerialization.h" 31 | #import "AFURLResponseSerialization.h" 32 | #import "AFSecurityPolicy.h" 33 | 34 | #if !TARGET_OS_WATCH 35 | #import "AFNetworkReachabilityManager.h" 36 | #endif 37 | 38 | #import "AFURLSessionManager.h" 39 | #import "AFHTTPSessionManager.h" 40 | 41 | #endif /* _AFNETWORKING_ */ 42 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Extend/UITableViewCell+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewCell+Extension.swift 3 | // MVVMFramework-Swift 4 | // 5 | // Created by momo on 15/12/29. 6 | // Copyright © 2015年 momo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public extension UITableViewCell { 13 | 14 | class internal func nibWithIdentifier(identifier: String) -> UINib{ 15 | return UINib(nibName: identifier, bundle: nil) 16 | } 17 | 18 | /** 19 | 从nib文件中根据重用标识符注册UITableViewCell 20 | 21 | - parameter table: table description 22 | - parameter identifier: identifier description 23 | */ 24 | class func registerTable(table: UITableView, nibIdentifier identifier: String) { 25 | return table.registerNib(self.nibWithIdentifier(identifier), forCellReuseIdentifier: identifier) 26 | } 27 | 28 | /** 29 | 配置UITableViewCell,设置UITableViewCell内容 30 | 31 | - parameter cell: cell description 32 | - parameter obj: obj description 33 | - parameter indexPath: indexPath description 34 | */ 35 | func configure(cell: UITableViewCell, customObj obj: AnyObject, indexPath: NSIndexPath) { 36 | // Rewrite this func in SubClass ! 37 | } 38 | 39 | /** 40 | 获取自定义对象的cell高度 (已集成UITableView+FDTemplateLayoutCell,现在创建的cell自动计算高度) 41 | 42 | - parameter obj: obj description 43 | - parameter indexPath: indexPath description 44 | 45 | - returns: return value description 46 | */ 47 | class func getCellHeightWithCustomObj(obj: AnyObject?, indexPath: NSIndexPath) -> CGFloat { 48 | // Rewrite this func in SubClass if necessary 49 | return obj == nil ? 44.0 : 0.0 // default cell height 44.0 50 | } 51 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SUIMVVMNetwork/SUIMVVMNetwork/SUIMVVMNetwork/SMKSingleton.h: -------------------------------------------------------------------------------- 1 | // .h文件 2 | #define SMKSingletonH(name) + (instancetype)shared##name; 3 | 4 | // .m文件 5 | #if __has_feature(objc_arc) 6 | 7 | #define SMKSingletonM(name) \ 8 | static id _instace; \ 9 | \ 10 | + (id)allocWithZone:(struct _NSZone *)zone \ 11 | { \ 12 | static dispatch_once_t onceToken; \ 13 | dispatch_once(&onceToken, ^{ \ 14 | _instace = [super allocWithZone:zone]; \ 15 | }); \ 16 | return _instace; \ 17 | } \ 18 | \ 19 | + (instancetype)shared##name \ 20 | { \ 21 | static dispatch_once_t onceToken; \ 22 | dispatch_once(&onceToken, ^{ \ 23 | _instace = [[self alloc] init]; \ 24 | }); \ 25 | return _instace; \ 26 | } \ 27 | \ 28 | - (id)copyWithZone:(NSZone *)zone \ 29 | { \ 30 | return _instace; \ 31 | } 32 | 33 | #else 34 | 35 | #define SMKSingletonM(name) \ 36 | static id _instace; \ 37 | \ 38 | + (id)allocWithZone:(struct _NSZone *)zone \ 39 | { \ 40 | static dispatch_once_t onceToken; \ 41 | dispatch_once(&onceToken, ^{ \ 42 | _instace = [super allocWithZone:zone]; \ 43 | }); \ 44 | return _instace; \ 45 | } \ 46 | \ 47 | + (instancetype)shared##name \ 48 | { \ 49 | static dispatch_once_t onceToken; \ 50 | dispatch_once(&onceToken, ^{ \ 51 | _instace = [[self alloc] init]; \ 52 | }); \ 53 | return _instace; \ 54 | } \ 55 | \ 56 | - (id)copyWithZone:(NSZone *)zone \ 57 | { \ 58 | return _instace; \ 59 | } \ 60 | \ 61 | - (oneway void)release { } \ 62 | - (id)retain { return self; } \ 63 | - (NSUInteger)retainCount { return 1;} \ 64 | - (id)autorelease { return self;} 65 | 66 | #endif -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/UITableView+FDTemplateLayoutCell/Classes/UITableView+FDTemplateLayoutCellDebug.h: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2016 forkingdog ( https://github.com/forkingdog ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | #import 24 | 25 | @interface UITableView (FDTemplateLayoutCellDebug) 26 | 27 | /// Helps to debug or inspect what is this "FDTemplateLayoutCell" extention doing, 28 | /// turning on to print logs when "creating", "calculating", "precaching" or "hitting cache". 29 | /// 30 | /// Default to NO, log by NSLog. 31 | /// 32 | @property (nonatomic, assign) BOOL fd_debugLogEnabled; 33 | 34 | /// Debug log controlled by "fd_debugLogEnabled". 35 | - (void)fd_debugLog:(NSString *)message; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SwiftExtensionKit/SwiftExtensionKit/SEKView+Nib.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SEKView+Nib.swift 3 | // SwiftExtensionKitDemo 4 | // 5 | // Created by yuantao on 16/3/3. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIView { 12 | 13 | public class func loadNib() -> UINib 14 | { 15 | return self.loadNibNamed("\(self.classForCoder())") 16 | } 17 | 18 | public class func loadNibNamed(nibName:String) -> UINib 19 | { 20 | return self.loadNibNamed(nibName, bundle: NSBundle.mainBundle()) 21 | } 22 | 23 | public class func loadNibNamed(nibName: String, bundle:NSBundle) -> UINib 24 | { 25 | return UINib.init(nibName: nibName, bundle: bundle) 26 | } 27 | 28 | public class func loadInstanceFromNib() -> UIView 29 | { 30 | return self.loadInstanceFromNibWithName("\(self.classForCoder())") 31 | } 32 | 33 | public class func loadInstanceFromNibWithName(nibName: String) -> UIView 34 | { 35 | return self.loadInstanceFromNibWithName(nibName, owner: []) 36 | } 37 | 38 | public class func loadInstanceFromNibWithName(nibName:String, owner:AnyObject) -> UIView 39 | { 40 | return self.loadInstanceFromNibWithName(nibName, owner: owner, bundle: NSBundle.mainBundle()) 41 | } 42 | 43 | public class func loadInstanceFromNibWithName(nibName: String, owner:AnyObject, bundle: NSBundle) -> UIView 44 | { 45 | var result = UIView() 46 | let elements = bundle.loadNibNamed(nibName, owner: owner, options: nil) 47 | for object in elements { 48 | if object.isKindOfClass(self.classForCoder()) { 49 | result = object as! UIView 50 | break 51 | } 52 | } 53 | return result 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/UIView+MJExtension.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIView+Extension.m 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import "UIView+MJExtension.h" 11 | 12 | @implementation UIView (MJExtension) 13 | - (void)setMj_x:(CGFloat)mj_x 14 | { 15 | CGRect frame = self.frame; 16 | frame.origin.x = mj_x; 17 | self.frame = frame; 18 | } 19 | 20 | - (CGFloat)mj_x 21 | { 22 | return self.frame.origin.x; 23 | } 24 | 25 | - (void)setMj_y:(CGFloat)mj_y 26 | { 27 | CGRect frame = self.frame; 28 | frame.origin.y = mj_y; 29 | self.frame = frame; 30 | } 31 | 32 | - (CGFloat)mj_y 33 | { 34 | return self.frame.origin.y; 35 | } 36 | 37 | - (void)setMj_w:(CGFloat)mj_w 38 | { 39 | CGRect frame = self.frame; 40 | frame.size.width = mj_w; 41 | self.frame = frame; 42 | } 43 | 44 | - (CGFloat)mj_w 45 | { 46 | return self.frame.size.width; 47 | } 48 | 49 | - (void)setMj_h:(CGFloat)mj_h 50 | { 51 | CGRect frame = self.frame; 52 | frame.size.height = mj_h; 53 | self.frame = frame; 54 | } 55 | 56 | - (CGFloat)mj_h 57 | { 58 | return self.frame.size.height; 59 | } 60 | 61 | - (void)setMj_size:(CGSize)mj_size 62 | { 63 | CGRect frame = self.frame; 64 | frame.size = mj_size; 65 | self.frame = frame; 66 | } 67 | 68 | - (CGSize)mj_size 69 | { 70 | return self.frame.size; 71 | } 72 | 73 | - (void)setMj_origin:(CGPoint)mj_origin 74 | { 75 | CGRect frame = self.frame; 76 | frame.origin = mj_origin; 77 | self.frame = frame; 78 | } 79 | 80 | - (CGPoint)mj_origin 81 | { 82 | return self.frame.origin; 83 | } 84 | @end 85 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SnapKit/Source/SnapKit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | public typealias InterfaceLayoutDirection = UIUserInterfaceLayoutDirection 27 | public typealias LayoutSupport = UILayoutSupport 28 | #else 29 | import AppKit 30 | public typealias InterfaceLayoutDirection = NSUserInterfaceLayoutDirection 31 | public class LayoutSupport {} 32 | #endif 33 | 34 | /** 35 | Used to configure different parts of SnapKit 36 | */ 37 | public struct Config { 38 | 39 | /// The interface layout direction 40 | public static var interfaceLayoutDirection = InterfaceLayoutDirection.LeftToRight 41 | 42 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIcons 10 | 11 | CFBundleIcons~ipad 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1 27 | LSRequiresIPhoneOS 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | UIRequiredDeviceCapabilities 39 | 40 | armv7 41 | 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UISupportedInterfaceOrientations~ipad 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationPortraitUpsideDown 52 | UIInterfaceOrientationLandscapeLeft 53 | UIInterfaceOrientationLandscapeRight 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/UITableView+FDTemplateLayoutCell/Classes/UITableView+FDKeyedHeightCache.h: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2016 forkingdog ( https://github.com/forkingdog ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | #import 24 | 25 | @interface FDKeyedHeightCache : NSObject 26 | 27 | - (BOOL)existsHeightForKey:(id)key; 28 | - (void)cacheHeight:(CGFloat)height byKey:(id)key; 29 | - (CGFloat)heightForKey:(id)key; 30 | 31 | // Invalidation 32 | - (void)invalidateHeightForKey:(id)key; 33 | - (void)invalidateAllHeightCache; 34 | @end 35 | 36 | @interface UITableView (FDKeyedHeightCache) 37 | 38 | /// Height cache by key. Generally, you don't need to use it directly. 39 | @property (nonatomic, strong, readonly) FDKeyedHeightCache *fd_keyedHeightCache; 40 | @end 41 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #if TARGET_OS_IOS || TARGET_OS_TV 24 | #import 25 | 26 | #ifndef _UIKIT_AFNETWORKING_ 27 | #define _UIKIT_AFNETWORKING_ 28 | 29 | #if TARGET_OS_IOS 30 | #import "AFAutoPurgingImageCache.h" 31 | #import "AFImageDownloader.h" 32 | #import "AFNetworkActivityIndicatorManager.h" 33 | #import "UIRefreshControl+AFNetworking.h" 34 | #import "UIWebView+AFNetworking.h" 35 | #endif 36 | 37 | #import "UIActivityIndicatorView+AFNetworking.h" 38 | #import "UIButton+AFNetworking.h" 39 | #import "UIImageView+AFNetworking.h" 40 | #import "UIProgressView+AFNetworking.h" 41 | #endif /* _UIKIT_AFNETWORKING_ */ 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SnapKit/Source/ConstraintRelation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | /** 31 | Used to define `NSLayoutRelation` 32 | */ 33 | internal enum ConstraintRelation: Int { 34 | case Equal = 1, LessThanOrEqualTo, GreaterThanOrEqualTo 35 | 36 | internal var layoutRelation: NSLayoutRelation { 37 | get { 38 | switch(self) { 39 | case .LessThanOrEqualTo: 40 | return .LessThanOrEqual 41 | case .GreaterThanOrEqualTo: 42 | return .GreaterThanOrEqual 43 | default: 44 | return .Equal 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/UITableView+FDTemplateLayoutCell/Classes/UITableView+FDTemplateLayoutCellDebug.m: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2016 forkingdog ( https://github.com/forkingdog ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | #import "UITableView+FDTemplateLayoutCellDebug.h" 24 | #import 25 | 26 | @implementation UITableView (FDTemplateLayoutCellDebug) 27 | 28 | - (BOOL)fd_debugLogEnabled { 29 | return [objc_getAssociatedObject(self, _cmd) boolValue]; 30 | } 31 | 32 | - (void)setFd_debugLogEnabled:(BOOL)debugLogEnabled { 33 | objc_setAssociatedObject(self, @selector(fd_debugLogEnabled), @(debugLogEnabled), OBJC_ASSOCIATION_RETAIN); 34 | } 35 | 36 | - (void)fd_debugLog:(NSString *)message { 37 | if (self.fd_debugLogEnabled) { 38 | NSLog(@"** FDTemplateLayoutCell ** %@", message); 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/firstExample/Controller/FirstVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstVC.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MJRefresh 11 | 12 | let MyCellIdentifier = "BQCell" // `cellIdentifier` AND `NibName` HAS TO BE SAME ! 13 | 14 | class FirstVC: UIViewController { 15 | 16 | @IBOutlet weak var table: UITableView! 17 | lazy var viewModel = BQViewModel() 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | setupTableView() 22 | } 23 | 24 | /** 25 | tableView的一些初始化工作 26 | */ 27 | func setupTableView() { 28 | 29 | table.separatorStyle = .None 30 | 31 | // 下拉刷新 32 | table.mj_header = MJRefreshNormalHeader { [weak self] () -> Void in 33 | if let strongSelf = self { 34 | strongSelf.viewModel.smk_viewModelWithGetDataSuccessHandler({ (array) -> () in 35 | strongSelf.table.reloadData() 36 | }) 37 | // 结束刷新 38 | self!.table.mj_header.endRefreshing() 39 | } 40 | } 41 | table.mj_header.automaticallyChangeAlpha = true 42 | 43 | table.tableHander = SMKBaseTableViewManger(cellIdentifiers: [MyCellIdentifier], didSelectBlock: { (_, _) -> Void in 44 | let vc = UIViewController.viewControllerWithStoryboardName("Main", vcIdentifier: "SecondVCID") 45 | self.navigationController?.pushViewController(vc, animated: true) 46 | }) 47 | 48 | viewModel.smk_viewModelWithGetDataSuccessHandler { (array) -> () in 49 | self.table.tableHander .getItemsWithModelArray({ () -> [AnyObject] in 50 | return array 51 | }, completion: { () -> () in 52 | self.table.reloadData() 53 | }) 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/SnapKit/Source/EdgeInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-2015 SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | public typealias EdgeInsets = UIEdgeInsets 27 | public func EdgeInsetsMake(top: CGFloat, left: CGFloat, bottom: CGFloat, right: CGFloat) -> EdgeInsets { 28 | return EdgeInsets(top: top, left: left, bottom: bottom, right: right) 29 | } 30 | public let EdgeInsetsZero = EdgeInsets(top: 0, left: 0, bottom: 0, right: 0) 31 | #else 32 | import AppKit 33 | public typealias EdgeInsets = NSEdgeInsets 34 | public func EdgeInsetsMake(top: CGFloat, left: CGFloat, bottom: CGFloat, right: CGFloat) -> EdgeInsets { 35 | return EdgeInsets(top: top, left: left, bottom: bottom, right: right) 36 | } 37 | public let EdgeInsetsZero = EdgeInsets(top: 0, left: 0, bottom: 0, right: 0) 38 | #endif 39 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/FDFullscreenPopGesture/README.md: -------------------------------------------------------------------------------- 1 | # FDFullscreenPopGesture 2 | An UINavigationController's category to enable fullscreen pop gesture in an iOS7+ system style with AOP. 3 | 4 | # Overview 5 | 6 | ![snapshot](https://raw.githubusercontent.com/forkingdog/FDFullscreenPopGesture/master/Snapshots/snapshot0.gif) 7 | 8 | 这个扩展来自 @J_雨 同学的这个很天才的思路,他的文章地址:[http://www.jianshu.com/p/d39f7d22db6c](http://www.jianshu.com/p/d39f7d22db6c) 9 | 10 | # Usage 11 | 12 | **AOP**, just add 2 files and **no need** for any setups, all navigation controllers will be able to use fullscreen pop gesture automatically. 13 | 14 | To disable this pop gesture of a navigation controller: 15 | 16 | ``` objc 17 | navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO; 18 | ``` 19 | 20 | To disable this pop gesture of a view controller: 21 | 22 | ``` objc 23 | viewController.fd_interactivePopDisabled = YES; 24 | ``` 25 | 26 | Require at least iOS **7.0**. 27 | 28 | # View Controller Based Navigation Bar Appearance 29 | 30 | It handles navigation bar transition properly when using fullscreen gesture to push or pop a view controller: 31 | 32 | - with bar -> without bar 33 | - without bar -> with bar 34 | - without bar -> without bar 35 | 36 | ![snapshot with bar states](https://raw.githubusercontent.com/forkingdog/FDFullscreenPopGesture/master/Snapshots/snapshot1.gif) 37 | 38 | This opmiziation is enabled by default, from now on you don't need to call **UINavigationController**'s `-setNavigationBarHidden:animated:` method, instead, use view controller's specific API to hide its bar: 39 | 40 | ``` objc 41 | - (void)viewDidLoad { 42 | [super viewDidLoad]; 43 | self.fd_prefersNavigationBarHidden = NO; 44 | } 45 | ``` 46 | 47 | And this property is **YES** by default. 48 | 49 | # Installation 50 | 51 | Use cocoapods 52 | 53 | ``` ruby 54 | pod 'FDFullscreenPopGesture', '1.1' 55 | ``` 56 | # Release Notes 57 | 58 | **1.1** - View controller based navigation bar appearance and transition. 59 | **1.0** - Fullscreen pop gesture. 60 | 61 | # License 62 | MIT 63 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJExtension/MJExtension/NSObject+MJCoding.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MJCoding.m 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "NSObject+MJCoding.h" 10 | #import "NSObject+MJClass.h" 11 | #import "NSObject+MJProperty.h" 12 | #import "MJProperty.h" 13 | 14 | @implementation NSObject (MJCoding) 15 | 16 | - (void)mj_encode:(NSCoder *)encoder 17 | { 18 | Class clazz = [self class]; 19 | 20 | NSArray *allowedCodingPropertyNames = [clazz mj_totalAllowedCodingPropertyNames]; 21 | NSArray *ignoredCodingPropertyNames = [clazz mj_totalIgnoredCodingPropertyNames]; 22 | 23 | [clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) { 24 | // 检测是否被忽略 25 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return; 26 | if ([ignoredCodingPropertyNames containsObject:property.name]) return; 27 | 28 | id value = [property valueForObject:self]; 29 | if (value == nil) return; 30 | [encoder encodeObject:value forKey:property.name]; 31 | }]; 32 | } 33 | 34 | - (void)mj_decode:(NSCoder *)decoder 35 | { 36 | Class clazz = [self class]; 37 | 38 | NSArray *allowedCodingPropertyNames = [clazz mj_totalAllowedCodingPropertyNames]; 39 | NSArray *ignoredCodingPropertyNames = [clazz mj_totalIgnoredCodingPropertyNames]; 40 | 41 | [clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) { 42 | // 检测是否被忽略 43 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return; 44 | if ([ignoredCodingPropertyNames containsObject:property.name]) return; 45 | 46 | id value = [decoder decodeObjectForKey:property.name]; 47 | if (value == nil) { // 兼容以前的MJExtension版本 48 | value = [decoder decodeObjectForKey:[@"_" stringByAppendingString:property.name]]; 49 | } 50 | if (value == nil) return; 51 | [property setValue:value forObject:self]; 52 | }]; 53 | } 54 | @end 55 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoNormalFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoNormalFooter.h" 10 | 11 | @interface MJRefreshAutoNormalFooter() 12 | @property (weak, nonatomic) UIActivityIndicatorView *loadingView; 13 | @end 14 | 15 | @implementation MJRefreshAutoNormalFooter 16 | #pragma mark - 懒加载子控件 17 | - (UIActivityIndicatorView *)loadingView 18 | { 19 | if (!_loadingView) { 20 | UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle]; 21 | loadingView.hidesWhenStopped = YES; 22 | [self addSubview:_loadingView = loadingView]; 23 | } 24 | return _loadingView; 25 | } 26 | 27 | - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle 28 | { 29 | _activityIndicatorViewStyle = activityIndicatorViewStyle; 30 | 31 | self.loadingView = nil; 32 | [self setNeedsLayout]; 33 | } 34 | #pragma makr - 重写父类的方法 35 | - (void)prepare 36 | { 37 | [super prepare]; 38 | 39 | self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; 40 | } 41 | 42 | - (void)placeSubviews 43 | { 44 | [super placeSubviews]; 45 | 46 | if (self.loadingView.constraints.count) return; 47 | 48 | // 圈圈 49 | CGFloat loadingCenterX = self.mj_w * 0.5; 50 | if (!self.isRefreshingTitleHidden) { 51 | loadingCenterX -= 100; 52 | } 53 | CGFloat loadingCenterY = self.mj_h * 0.5; 54 | self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY); 55 | } 56 | 57 | - (void)setState:(MJRefreshState)state 58 | { 59 | MJRefreshCheckState 60 | 61 | // 根据状态做事情 62 | if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { 63 | [self.loadingView stopAnimating]; 64 | } else if (state == MJRefreshStateRefreshing) { 65 | [self.loadingView startAnimating]; 66 | } 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /SwiftMVVMKit/Protocol/SMKViewMangerProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SMKViewMangerProtocolDelegate.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol SMKViewMangerProtocolDelegate: NSObjectProtocol { 12 | 13 | /** 14 | 设置Controller的子视图的管理者为self 15 | 16 | - parameter superView: 一般指subView所在控制器的view 17 | 18 | - returns: return value description 19 | */ 20 | optional func smk_viewMangerWithSuperView(superView: UIView) 21 | 22 | /** 23 | 设置subView的管理者为self 24 | 25 | - parameter subView: 管理的subView 26 | 27 | - returns: return value description 28 | */ 29 | optional func smk_viewMangerWithSubView(subView: UIView?) 30 | 31 | /** 32 | 设置添加subView的事件 33 | 34 | - parameter subView: 管理的subView 35 | - parameter info: 附带信息,用于区分调用 36 | 37 | - returns: return value description 38 | */ 39 | optional func smk_viewMangerWithHandleOfSubView(subView: UIView, info: String?) 40 | 41 | /** 42 | 返回viewManger所管理的视图 43 | 44 | - returns: viewManger所管理的视图 45 | */ 46 | optional func smk_viewMangerOfSubView() -> UIView 47 | 48 | /** 49 | 得到其它viewManger所管理的subView,用于自己内部 50 | 51 | - parameter viewInfos: 其它的subViews 52 | 53 | - returns: return value description 54 | */ 55 | optional func smk_viewMangerWithOtherSubViews(viewInfos: [NSObject : AnyObject]?) 56 | 57 | /** 58 | 需要重新布局subView时,更改subView的frame或者约束 59 | 60 | - parameter updateBlock: 更新布局完成的block 61 | */ 62 | optional func smk_viewMangerWithLayoutSubViews(updateBlock: (( ) -> ( ))?) 63 | 64 | /** 65 | 使子视图更新到最新的布局约束或者frame 66 | */ 67 | optional func smk_viewMangerWithUpdateLayoutSubViews() 68 | 69 | /** 70 | 将model数据传递给viewManger 71 | 72 | - parameter dictBlock: dictBlock description 73 | */ 74 | optional func smk_viewMangerWithModel(dictBlock: (( ) -> [NSObject : AnyObject]?)?) 75 | } 76 | 77 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/SwiftMVVMKit/Protocol/SMKViewMangerProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SMKViewMangerProtocolDelegate.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol SMKViewMangerProtocolDelegate: NSObjectProtocol { 12 | 13 | /** 14 | 设置Controller的子视图的管理者为self 15 | 16 | - parameter superView: 一般指subView所在控制器的view 17 | 18 | - returns: return value description 19 | */ 20 | optional func smk_viewMangerWithSuperView(superView: UIView) 21 | 22 | /** 23 | 设置subView的管理者为self 24 | 25 | - parameter subView: 管理的subView 26 | 27 | - returns: return value description 28 | */ 29 | optional func smk_viewMangerWithSubView(subView: UIView?) 30 | 31 | /** 32 | 设置添加subView的事件 33 | 34 | - parameter subView: 管理的subView 35 | - parameter info: 附带信息,用于区分调用 36 | 37 | - returns: return value description 38 | */ 39 | optional func smk_viewMangerWithHandleOfSubView(subView: UIView, info: String?) 40 | 41 | /** 42 | 返回viewManger所管理的视图 43 | 44 | - returns: viewManger所管理的视图 45 | */ 46 | optional func smk_viewMangerOfSubView() -> UIView 47 | 48 | /** 49 | 得到其它viewManger所管理的subView,用于自己内部 50 | 51 | - parameter viewInfos: 其它的subViews 52 | 53 | - returns: return value description 54 | */ 55 | optional func smk_viewMangerWithOtherSubViews(viewInfos: [NSObject : AnyObject]?) 56 | 57 | /** 58 | 需要重新布局subView时,更改subView的frame或者约束 59 | 60 | - parameter updateBlock: 更新布局完成的block 61 | */ 62 | optional func smk_viewMangerWithLayoutSubViews(updateBlock: (( ) -> ( ))?) 63 | 64 | /** 65 | 使子视图更新到最新的布局约束或者frame 66 | */ 67 | optional func smk_viewMangerWithUpdateLayoutSubViews() 68 | 69 | /** 70 | 将model数据传递给viewManger 71 | 72 | - parameter dictBlock: dictBlock description 73 | */ 74 | optional func smk_viewMangerWithModel(dictBlock: (( ) -> [NSObject : AnyObject]?)?) 75 | } 76 | 77 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshFooter.m 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/5. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 9 | 10 | #import "MJRefreshFooter.h" 11 | 12 | @interface MJRefreshFooter() 13 | 14 | @end 15 | 16 | @implementation MJRefreshFooter 17 | #pragma mark - 构造方法 18 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock 19 | { 20 | MJRefreshFooter *cmp = [[self alloc] init]; 21 | cmp.refreshingBlock = refreshingBlock; 22 | return cmp; 23 | } 24 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action 25 | { 26 | MJRefreshFooter *cmp = [[self alloc] init]; 27 | [cmp setRefreshingTarget:target refreshingAction:action]; 28 | return cmp; 29 | } 30 | 31 | #pragma mark - 重写父类的方法 32 | - (void)prepare 33 | { 34 | [super prepare]; 35 | 36 | // 设置自己的高度 37 | self.mj_h = MJRefreshFooterHeight; 38 | 39 | // 默认不会自动隐藏 40 | self.automaticallyHidden = NO; 41 | } 42 | 43 | - (void)willMoveToSuperview:(UIView *)newSuperview 44 | { 45 | [super willMoveToSuperview:newSuperview]; 46 | 47 | if (newSuperview) { 48 | // 监听scrollView数据的变化 49 | if ([self.scrollView isKindOfClass:[UITableView class]] || [self.scrollView isKindOfClass:[UICollectionView class]]) { 50 | [self.scrollView setMj_reloadDataBlock:^(NSInteger totalDataCount) { 51 | if (self.isAutomaticallyHidden) { 52 | self.hidden = (totalDataCount == 0); 53 | } 54 | }]; 55 | } 56 | } 57 | } 58 | 59 | #pragma mark - 公共方法 60 | - (void)endRefreshingWithNoMoreData 61 | { 62 | self.state = MJRefreshStateNoMoreData; 63 | } 64 | 65 | - (void)noticeNoMoreData 66 | { 67 | [self endRefreshingWithNoMoreData]; 68 | } 69 | 70 | - (void)resetNoMoreData 71 | { 72 | self.state = MJRefreshStateIdle; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackStateFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackStateFooter() 12 | { 13 | /** 显示刷新状态的label */ 14 | __unsafe_unretained UILabel *_stateLabel; 15 | } 16 | /** 所有状态对应的文字 */ 17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles; 18 | @end 19 | 20 | @implementation MJRefreshBackStateFooter 21 | #pragma mark - 懒加载 22 | - (NSMutableDictionary *)stateTitles 23 | { 24 | if (!_stateTitles) { 25 | self.stateTitles = [NSMutableDictionary dictionary]; 26 | } 27 | return _stateTitles; 28 | } 29 | 30 | - (UILabel *)stateLabel 31 | { 32 | if (!_stateLabel) { 33 | [self addSubview:_stateLabel = [UILabel label]]; 34 | } 35 | return _stateLabel; 36 | } 37 | 38 | #pragma mark - 公共方法 39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state 40 | { 41 | if (title == nil) return; 42 | self.stateTitles[@(state)] = title; 43 | self.stateLabel.text = self.stateTitles[@(self.state)]; 44 | } 45 | 46 | - (NSString *)titleForState:(MJRefreshState)state { 47 | return self.stateTitles[@(state)]; 48 | } 49 | 50 | #pragma mark - 重写父类的方法 51 | - (void)prepare 52 | { 53 | [super prepare]; 54 | 55 | // 初始化文字 56 | [self setTitle:MJRefreshBackFooterIdleText forState:MJRefreshStateIdle]; 57 | [self setTitle:MJRefreshBackFooterPullingText forState:MJRefreshStatePulling]; 58 | [self setTitle:MJRefreshBackFooterRefreshingText forState:MJRefreshStateRefreshing]; 59 | [self setTitle:MJRefreshBackFooterNoMoreDataText forState:MJRefreshStateNoMoreData]; 60 | } 61 | 62 | - (void)placeSubviews 63 | { 64 | [super placeSubviews]; 65 | 66 | if (self.stateLabel.constraints.count) return; 67 | 68 | // 状态标签 69 | self.stateLabel.frame = self.bounds; 70 | } 71 | 72 | - (void)setState:(MJRefreshState)state 73 | { 74 | MJRefreshCheckState 75 | 76 | // 设置状态文字 77 | self.stateLabel.text = self.stateTitles[@(state)]; 78 | } 79 | @end 80 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/thirdExample/ViewManger/ThirdViewManger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdViewManger.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftExtensionKit 11 | 12 | class ThirdViewManger: NSObject, SMKViewMangerProtocolDelegate, SMKViewProtocolDelegate { 13 | 14 | lazy var thirdView = ThirdView.loadInstanceFromNib() as? ThirdView 15 | lazy var dict = [ : ] 16 | 17 | override init() { 18 | super.init() 19 | 20 | thirdView?.delegate = self 21 | // btnClickBlock 22 | thirdView?.viewEventsBlock = { (events: AnyObject...) -> ( ) in 23 | for event in events { 24 | print(event) 25 | } 26 | self.smk_viewMangerWithHandleOfSubView(self.thirdView!, info: "click") 27 | } 28 | } 29 | 30 | // UIView的delegate方法 ,两种消息传递方式,开发时任选其一即可 根据传入的events信息处理事件 31 | func smk_view(view: UIView, events: [NSObject : AnyObject]?) { 32 | 33 | print("----------\(events)") 34 | for key in events!.keys { 35 | if key == "jump" { 36 | let firstVC = UIViewController.viewControllerWithStoryboardName("Main", vcIdentifier: "FirstVCID") 37 | view.viewController()?.navigationController?.pushViewController(firstVC, animated: true) 38 | } 39 | } 40 | 41 | } 42 | 43 | // 得到父视图,添加subView -> superView 44 | func smk_viewMangerWithSuperView(superView: UIView) { 45 | thirdView?.frame = CGRectMake(0, 66, UIScreen.mainScreen().bounds.size.width, 200); 46 | superView.addSubview(thirdView!) 47 | } 48 | 49 | // 根据传入的info设置添加subView的事件 50 | func smk_viewMangerWithHandleOfSubView(subView: UIView, info: String?) { 51 | if info == "click" { 52 | subView.configureViewWithCustomObj(dict["model"] as? NSObject) 53 | } 54 | } 55 | 56 | // 得到传入的模型数据 57 | func smk_viewMangerWithModel(dictBlock: (() -> [NSObject : AnyObject]?)?) { 58 | if let _ = dictBlock { 59 | dict = dictBlock!()! 60 | } 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /SwiftMVVMKitDemo/SwiftMVVMKitDemo/Classes/Src/secondExample/Controller/SecondVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondVC.swift 3 | // SwiftMVVMKitDemo 4 | // 5 | // Created by yuantao on 16/3/7. 6 | // Copyright © 2016年 momo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | let MyCellIdentifier2 = "BQCollectionCell" // `cellIdentifier` AND `NibName` HAS TO BE SAME ! 12 | 13 | class SecondVC: UIViewController { 14 | 15 | @IBOutlet weak var collectionView: UICollectionView! 16 | lazy var viewModel = BQViewModel2() 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | self.setupCollectionView() 21 | 22 | } 23 | 24 | /** 25 | collectionView的一些初始化工作 26 | */ 27 | func setupCollectionView() 28 | { 29 | 30 | collectionView.contentInset = UIEdgeInsetsMake(-60, 0, 0, 0) 31 | 32 | // 设置点击collectionView的每个item做的一些工作 33 | let selectedBlock: didSelectCollectionCellBlock = {(indexPath, item) -> Void in 34 | print("click row : \((indexPath.row))") 35 | self.dismissViewControllerAnimated(true, completion: nil) 36 | } 37 | // 配置collectionView的每个item的size 38 | let cellItemSizeBlock: cellItemSize = { 39 | return CGSizeMake(110, 160) 40 | } 41 | // 配置collectionView的每个item的margin 42 | let cellItemMarginBlock: cellItemMargin = { 43 | return UIEdgeInsetsMake(0, 20, 0, 20) 44 | } 45 | 46 | // 将上述block设置给collectionHander // 可用自定义UICollectionViewLayout 47 | self.collectionView.collectionHander = SMKBaseCollectionViewManger(cellIdentifiers: [MyCellIdentifier2], collectionViewLayout: UICollectionViewFlowLayout(), cellItemSizeBlock: cellItemSizeBlock, cellItemMarginBlock: cellItemMarginBlock, didSelectBlock: selectedBlock) 48 | 49 | viewModel.smk_viewModelWithGetDataSuccessHandler { (array) -> () in 50 | self.collectionView.collectionHander.getItemsWithModelArray({ () -> [AnyObject] in 51 | return array 52 | }, completion: { () -> () in 53 | self.collectionView.reloadData() 54 | }) 55 | } 56 | } 57 | 58 | } 59 | --------------------------------------------------------------------------------