├── .gitignore ├── CollectionViewMoveCellDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── CollectionViewMoveCellDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── CellData.plist ├── DTCollectionViewCell.h ├── DTCollectionViewCell.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── DTCategories.framework ├── DTCategories ├── Headers └── Versions │ ├── A │ ├── DTCategories │ └── Headers │ │ ├── ALAssetsLibrary+SaveAsset.h │ │ ├── AVCaptureDevice+CaptureDevice.h │ │ ├── CAMediaTimingFunction+MediaTimingFunction.h │ │ ├── CGAffineTransformExtension.h │ │ ├── CGRectExtension.h │ │ ├── CLLocation+Location.h │ │ ├── ColorNames.h │ │ ├── DTCategories.h │ │ ├── NSArray+AroundArray.h │ │ ├── NSArray+Array.h │ │ ├── NSAttributedString+AttributedString.h │ │ ├── NSData+Data.h │ │ ├── NSDate+Date.h │ │ ├── NSDate+DateFormatter.h │ │ ├── NSDateFormatter+DateFormatter.h │ │ ├── NSDictionary+Dictionary.h │ │ ├── NSDictionary+InfoPlist.h │ │ ├── NSIndexPath+IndexPath.h │ │ ├── NSMutableArray+Array.h │ │ ├── NSNumber+Mathematica.h │ │ ├── NSNumber+Ordinal.h │ │ ├── NSNumberFormatter+DecimalFormater.h │ │ ├── NSOperationQueue+OperationQueue.h │ │ ├── NSString+String.h │ │ ├── NSTimeZone+TimeZone.h │ │ ├── NSURL+URL.h │ │ ├── NSURLSession+URLSession.h │ │ ├── NSUserDefaults+UserDefaults.h │ │ ├── PHCollection+Collection.h │ │ ├── PHPhotoLibrary+PhotoLibrary.h │ │ ├── UIActivityIndicatorView+ActivityIndicatorView.h │ │ ├── UIActivityViewController+ActivityViewController.h │ │ ├── UIApplicationShortcutItem+ShortcutItem.h │ │ ├── UIBarButtonItem+BarButtonItem.h │ │ ├── UIButton+Bootstrap.h │ │ ├── UIButton+Button.h │ │ ├── UIButton+GradientColorButton.h │ │ ├── UIButton+RoundedRectButton.h │ │ ├── UICollectionView+CollectionView.h │ │ ├── UIColor+Colors.h │ │ ├── UIColor+FlatUIColors.h │ │ ├── UIColor+NipponColors.h │ │ ├── UIDevice+Device.h │ │ ├── UIDevice+Version.h │ │ ├── UIGestureRecognizer+GestureRecognizer.h │ │ ├── UIImage+ColorPicker.h │ │ ├── UIImage+DrawImage.h │ │ ├── UIImage+Image.h │ │ ├── UIImage+Resize.h │ │ ├── UIImage+ResizeImage.h │ │ ├── UIImageView+ImageView.h │ │ ├── UILabel+Label.h │ │ ├── UIMotionEffect+MotionEffect.h │ │ ├── UIMutableUserNotificationAction+UserNotificationAction.h │ │ ├── UIMutableUserNotificationCategory+UserNotificationCategory.h │ │ ├── UINavigationController+Navigation.h │ │ ├── UIPageControl+PageControl.h │ │ ├── UIPickerView+PickerView.h │ │ ├── UIRefreshControl+RefreshControl.h │ │ ├── UIScrollView+ScrollView.h │ │ ├── UISearchBar+SearchBar.h │ │ ├── UISegmentedControl+SegmentedControl.h │ │ ├── UISplitViewController+SplitView.h │ │ ├── UISwitch+Switch.h │ │ ├── UITabBarController+TabBar.h │ │ ├── UITableView+TableView.h │ │ ├── UITextField+TextField.h │ │ ├── UITextView+TextView.h │ │ ├── UIToolbar+Toolbar.h │ │ ├── UIView+View.h │ │ ├── UIView+Wobble.h │ │ ├── UIViewController+ViewController.h │ │ ├── UIVisualEffectView+VisualEffectView.h │ │ ├── UIWebView+WebView.h │ │ └── UIWindow+Window.h │ └── Current ├── DTCollectionViewCellMover ├── DTCollectionViewCellMover.h ├── DTCollectionViewCellMover.m ├── UICollectionView+CellMover.h └── UICollectionView+CellMover.m ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 526F385A1CF2D28600E5D57D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 526F38591CF2D28600E5D57D /* main.m */; }; 11 | 526F385D1CF2D28600E5D57D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 526F385C1CF2D28600E5D57D /* AppDelegate.m */; }; 12 | 526F38601CF2D28600E5D57D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 526F385F1CF2D28600E5D57D /* ViewController.m */; }; 13 | 526F38631CF2D28600E5D57D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 526F38611CF2D28600E5D57D /* Main.storyboard */; }; 14 | 526F38651CF2D28600E5D57D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 526F38641CF2D28600E5D57D /* Assets.xcassets */; }; 15 | 526F38681CF2D28600E5D57D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 526F38661CF2D28600E5D57D /* LaunchScreen.storyboard */; }; 16 | 526F38741CF2D33F00E5D57D /* DTCollectionViewCellMover.m in Sources */ = {isa = PBXBuildFile; fileRef = 526F38731CF2D33F00E5D57D /* DTCollectionViewCellMover.m */; }; 17 | 526F38781CF2D66A00E5D57D /* UICollectionView+CellMover.m in Sources */ = {isa = PBXBuildFile; fileRef = 526F38771CF2D66A00E5D57D /* UICollectionView+CellMover.m */; }; 18 | 526F387B1CF2E0A100E5D57D /* DTCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 526F387A1CF2E0A100E5D57D /* DTCollectionViewCell.m */; }; 19 | 526F387D1CF2E2AF00E5D57D /* CellData.plist in Resources */ = {isa = PBXBuildFile; fileRef = 526F387C1CF2E2AF00E5D57D /* CellData.plist */; }; 20 | 526F387F1CF2E37900E5D57D /* DTCategories.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 526F387E1CF2E37900E5D57D /* DTCategories.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 526F38551CF2D28600E5D57D /* CollectionViewMoveCellDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CollectionViewMoveCellDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | 526F38591CF2D28600E5D57D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 26 | 526F385B1CF2D28600E5D57D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 27 | 526F385C1CF2D28600E5D57D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 28 | 526F385E1CF2D28600E5D57D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 29 | 526F385F1CF2D28600E5D57D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 30 | 526F38621CF2D28600E5D57D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 31 | 526F38641CF2D28600E5D57D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 32 | 526F38671CF2D28600E5D57D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 33 | 526F38691CF2D28600E5D57D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | 526F38721CF2D33F00E5D57D /* DTCollectionViewCellMover.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTCollectionViewCellMover.h; sourceTree = ""; }; 35 | 526F38731CF2D33F00E5D57D /* DTCollectionViewCellMover.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DTCollectionViewCellMover.m; sourceTree = ""; }; 36 | 526F38761CF2D66A00E5D57D /* UICollectionView+CellMover.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UICollectionView+CellMover.h"; sourceTree = ""; }; 37 | 526F38771CF2D66A00E5D57D /* UICollectionView+CellMover.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UICollectionView+CellMover.m"; sourceTree = ""; }; 38 | 526F38791CF2E0A100E5D57D /* DTCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTCollectionViewCell.h; sourceTree = ""; }; 39 | 526F387A1CF2E0A100E5D57D /* DTCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DTCollectionViewCell.m; sourceTree = ""; }; 40 | 526F387C1CF2E2AF00E5D57D /* CellData.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = CellData.plist; sourceTree = ""; }; 41 | 526F387E1CF2E37900E5D57D /* DTCategories.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DTCategories.framework; sourceTree = ""; }; 42 | /* End PBXFileReference section */ 43 | 44 | /* Begin PBXFrameworksBuildPhase section */ 45 | 526F38521CF2D28600E5D57D /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | 526F387F1CF2E37900E5D57D /* DTCategories.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 526F384C1CF2D28600E5D57D = { 57 | isa = PBXGroup; 58 | children = ( 59 | 526F387E1CF2E37900E5D57D /* DTCategories.framework */, 60 | 526F38571CF2D28600E5D57D /* CollectionViewMoveCellDemo */, 61 | 526F38561CF2D28600E5D57D /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 526F38561CF2D28600E5D57D /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 526F38551CF2D28600E5D57D /* CollectionViewMoveCellDemo.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 526F38571CF2D28600E5D57D /* CollectionViewMoveCellDemo */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 526F385B1CF2D28600E5D57D /* AppDelegate.h */, 77 | 526F385C1CF2D28600E5D57D /* AppDelegate.m */, 78 | 526F385E1CF2D28600E5D57D /* ViewController.h */, 79 | 526F385F1CF2D28600E5D57D /* ViewController.m */, 80 | 526F38791CF2E0A100E5D57D /* DTCollectionViewCell.h */, 81 | 526F387A1CF2E0A100E5D57D /* DTCollectionViewCell.m */, 82 | 526F38751CF2D63700E5D57D /* DTCollectionViewCellMover */, 83 | 526F38611CF2D28600E5D57D /* Main.storyboard */, 84 | 526F38641CF2D28600E5D57D /* Assets.xcassets */, 85 | 526F38661CF2D28600E5D57D /* LaunchScreen.storyboard */, 86 | 526F38691CF2D28600E5D57D /* Info.plist */, 87 | 526F38581CF2D28600E5D57D /* Supporting Files */, 88 | 526F387C1CF2E2AF00E5D57D /* CellData.plist */, 89 | ); 90 | path = CollectionViewMoveCellDemo; 91 | sourceTree = ""; 92 | }; 93 | 526F38581CF2D28600E5D57D /* Supporting Files */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 526F38591CF2D28600E5D57D /* main.m */, 97 | ); 98 | name = "Supporting Files"; 99 | sourceTree = ""; 100 | }; 101 | 526F38751CF2D63700E5D57D /* DTCollectionViewCellMover */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 526F38721CF2D33F00E5D57D /* DTCollectionViewCellMover.h */, 105 | 526F38731CF2D33F00E5D57D /* DTCollectionViewCellMover.m */, 106 | 526F38761CF2D66A00E5D57D /* UICollectionView+CellMover.h */, 107 | 526F38771CF2D66A00E5D57D /* UICollectionView+CellMover.m */, 108 | ); 109 | name = DTCollectionViewCellMover; 110 | path = ../DTCollectionViewCellMover; 111 | sourceTree = ""; 112 | }; 113 | /* End PBXGroup section */ 114 | 115 | /* Begin PBXNativeTarget section */ 116 | 526F38541CF2D28600E5D57D /* CollectionViewMoveCellDemo */ = { 117 | isa = PBXNativeTarget; 118 | buildConfigurationList = 526F386C1CF2D28600E5D57D /* Build configuration list for PBXNativeTarget "CollectionViewMoveCellDemo" */; 119 | buildPhases = ( 120 | 526F38511CF2D28600E5D57D /* Sources */, 121 | 526F38521CF2D28600E5D57D /* Frameworks */, 122 | 526F38531CF2D28600E5D57D /* Resources */, 123 | ); 124 | buildRules = ( 125 | ); 126 | dependencies = ( 127 | ); 128 | name = CollectionViewMoveCellDemo; 129 | productName = CollectionViewMoveCellDemo; 130 | productReference = 526F38551CF2D28600E5D57D /* CollectionViewMoveCellDemo.app */; 131 | productType = "com.apple.product-type.application"; 132 | }; 133 | /* End PBXNativeTarget section */ 134 | 135 | /* Begin PBXProject section */ 136 | 526F384D1CF2D28600E5D57D /* Project object */ = { 137 | isa = PBXProject; 138 | attributes = { 139 | CLASSPREFIX = DT; 140 | LastUpgradeCheck = 0730; 141 | ORGANIZATIONNAME = Darktt; 142 | TargetAttributes = { 143 | 526F38541CF2D28600E5D57D = { 144 | CreatedOnToolsVersion = 7.3.1; 145 | DevelopmentTeam = FB3JLE8VZY; 146 | }; 147 | }; 148 | }; 149 | buildConfigurationList = 526F38501CF2D28600E5D57D /* Build configuration list for PBXProject "CollectionViewMoveCellDemo" */; 150 | compatibilityVersion = "Xcode 3.2"; 151 | developmentRegion = English; 152 | hasScannedForEncodings = 0; 153 | knownRegions = ( 154 | en, 155 | Base, 156 | ); 157 | mainGroup = 526F384C1CF2D28600E5D57D; 158 | productRefGroup = 526F38561CF2D28600E5D57D /* Products */; 159 | projectDirPath = ""; 160 | projectRoot = ""; 161 | targets = ( 162 | 526F38541CF2D28600E5D57D /* CollectionViewMoveCellDemo */, 163 | ); 164 | }; 165 | /* End PBXProject section */ 166 | 167 | /* Begin PBXResourcesBuildPhase section */ 168 | 526F38531CF2D28600E5D57D /* Resources */ = { 169 | isa = PBXResourcesBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | 526F38681CF2D28600E5D57D /* LaunchScreen.storyboard in Resources */, 173 | 526F38651CF2D28600E5D57D /* Assets.xcassets in Resources */, 174 | 526F387D1CF2E2AF00E5D57D /* CellData.plist in Resources */, 175 | 526F38631CF2D28600E5D57D /* Main.storyboard in Resources */, 176 | ); 177 | runOnlyForDeploymentPostprocessing = 0; 178 | }; 179 | /* End PBXResourcesBuildPhase section */ 180 | 181 | /* Begin PBXSourcesBuildPhase section */ 182 | 526F38511CF2D28600E5D57D /* Sources */ = { 183 | isa = PBXSourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 526F38781CF2D66A00E5D57D /* UICollectionView+CellMover.m in Sources */, 187 | 526F38601CF2D28600E5D57D /* ViewController.m in Sources */, 188 | 526F387B1CF2E0A100E5D57D /* DTCollectionViewCell.m in Sources */, 189 | 526F385D1CF2D28600E5D57D /* AppDelegate.m in Sources */, 190 | 526F38741CF2D33F00E5D57D /* DTCollectionViewCellMover.m in Sources */, 191 | 526F385A1CF2D28600E5D57D /* main.m in Sources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXSourcesBuildPhase section */ 196 | 197 | /* Begin PBXVariantGroup section */ 198 | 526F38611CF2D28600E5D57D /* Main.storyboard */ = { 199 | isa = PBXVariantGroup; 200 | children = ( 201 | 526F38621CF2D28600E5D57D /* Base */, 202 | ); 203 | name = Main.storyboard; 204 | sourceTree = ""; 205 | }; 206 | 526F38661CF2D28600E5D57D /* LaunchScreen.storyboard */ = { 207 | isa = PBXVariantGroup; 208 | children = ( 209 | 526F38671CF2D28600E5D57D /* Base */, 210 | ); 211 | name = LaunchScreen.storyboard; 212 | sourceTree = ""; 213 | }; 214 | /* End PBXVariantGroup section */ 215 | 216 | /* Begin XCBuildConfiguration section */ 217 | 526F386A1CF2D28600E5D57D /* Debug */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | CLANG_ANALYZER_NONNULL = YES; 222 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 223 | CLANG_CXX_LIBRARY = "libc++"; 224 | CLANG_ENABLE_MODULES = YES; 225 | CLANG_ENABLE_OBJC_ARC = YES; 226 | CLANG_WARN_BOOL_CONVERSION = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 229 | CLANG_WARN_EMPTY_BODY = YES; 230 | CLANG_WARN_ENUM_CONVERSION = YES; 231 | CLANG_WARN_INT_CONVERSION = YES; 232 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 233 | CLANG_WARN_UNREACHABLE_CODE = YES; 234 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 235 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 236 | COPY_PHASE_STRIP = NO; 237 | DEBUG_INFORMATION_FORMAT = dwarf; 238 | ENABLE_STRICT_OBJC_MSGSEND = YES; 239 | ENABLE_TESTABILITY = YES; 240 | GCC_C_LANGUAGE_STANDARD = gnu99; 241 | GCC_DYNAMIC_NO_PIC = NO; 242 | GCC_NO_COMMON_BLOCKS = YES; 243 | GCC_OPTIMIZATION_LEVEL = 0; 244 | GCC_PREPROCESSOR_DEFINITIONS = ( 245 | "DEBUG=1", 246 | "$(inherited)", 247 | ); 248 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 249 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 250 | GCC_WARN_UNDECLARED_SELECTOR = YES; 251 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 252 | GCC_WARN_UNUSED_FUNCTION = YES; 253 | GCC_WARN_UNUSED_VARIABLE = YES; 254 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 255 | MTL_ENABLE_DEBUG_INFO = YES; 256 | ONLY_ACTIVE_ARCH = YES; 257 | SDKROOT = iphoneos; 258 | TARGETED_DEVICE_FAMILY = 2; 259 | }; 260 | name = Debug; 261 | }; 262 | 526F386B1CF2D28600E5D57D /* Release */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | ALWAYS_SEARCH_USER_PATHS = NO; 266 | CLANG_ANALYZER_NONNULL = YES; 267 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 268 | CLANG_CXX_LIBRARY = "libc++"; 269 | CLANG_ENABLE_MODULES = YES; 270 | CLANG_ENABLE_OBJC_ARC = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_CONSTANT_CONVERSION = YES; 273 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 274 | CLANG_WARN_EMPTY_BODY = YES; 275 | CLANG_WARN_ENUM_CONVERSION = YES; 276 | CLANG_WARN_INT_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_UNREACHABLE_CODE = YES; 279 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 280 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 281 | COPY_PHASE_STRIP = NO; 282 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 283 | ENABLE_NS_ASSERTIONS = NO; 284 | ENABLE_STRICT_OBJC_MSGSEND = YES; 285 | GCC_C_LANGUAGE_STANDARD = gnu99; 286 | GCC_NO_COMMON_BLOCKS = YES; 287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 289 | GCC_WARN_UNDECLARED_SELECTOR = YES; 290 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 291 | GCC_WARN_UNUSED_FUNCTION = YES; 292 | GCC_WARN_UNUSED_VARIABLE = YES; 293 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 294 | MTL_ENABLE_DEBUG_INFO = NO; 295 | SDKROOT = iphoneos; 296 | TARGETED_DEVICE_FAMILY = 2; 297 | VALIDATE_PRODUCT = YES; 298 | }; 299 | name = Release; 300 | }; 301 | 526F386D1CF2D28600E5D57D /* Debug */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 305 | CLANG_ENABLE_OBJC_ARC = NO; 306 | DEVELOPMENT_TEAM = FB3JLE8VZY; 307 | FRAMEWORK_SEARCH_PATHS = ( 308 | "$(inherited)", 309 | "$(PROJECT_DIR)", 310 | ); 311 | INFOPLIST_FILE = CollectionViewMoveCellDemo/Info.plist; 312 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 313 | OTHER_LDFLAGS = "-ObjC"; 314 | PRODUCT_BUNDLE_IDENTIFIER = tw.darktt.CollectionViewMoveCellDemo; 315 | PRODUCT_NAME = "$(TARGET_NAME)"; 316 | TARGETED_DEVICE_FAMILY = 1; 317 | }; 318 | name = Debug; 319 | }; 320 | 526F386E1CF2D28600E5D57D /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | buildSettings = { 323 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 324 | CLANG_ENABLE_OBJC_ARC = NO; 325 | DEVELOPMENT_TEAM = FB3JLE8VZY; 326 | FRAMEWORK_SEARCH_PATHS = ( 327 | "$(inherited)", 328 | "$(PROJECT_DIR)", 329 | ); 330 | INFOPLIST_FILE = CollectionViewMoveCellDemo/Info.plist; 331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 332 | OTHER_LDFLAGS = "-ObjC"; 333 | PRODUCT_BUNDLE_IDENTIFIER = tw.darktt.CollectionViewMoveCellDemo; 334 | PRODUCT_NAME = "$(TARGET_NAME)"; 335 | TARGETED_DEVICE_FAMILY = 1; 336 | }; 337 | name = Release; 338 | }; 339 | /* End XCBuildConfiguration section */ 340 | 341 | /* Begin XCConfigurationList section */ 342 | 526F38501CF2D28600E5D57D /* Build configuration list for PBXProject "CollectionViewMoveCellDemo" */ = { 343 | isa = XCConfigurationList; 344 | buildConfigurations = ( 345 | 526F386A1CF2D28600E5D57D /* Debug */, 346 | 526F386B1CF2D28600E5D57D /* Release */, 347 | ); 348 | defaultConfigurationIsVisible = 0; 349 | defaultConfigurationName = Release; 350 | }; 351 | 526F386C1CF2D28600E5D57D /* Build configuration list for PBXNativeTarget "CollectionViewMoveCellDemo" */ = { 352 | isa = XCConfigurationList; 353 | buildConfigurations = ( 354 | 526F386D1CF2D28600E5D57D /* Debug */, 355 | 526F386E1CF2D28600E5D57D /* Release */, 356 | ); 357 | defaultConfigurationIsVisible = 0; 358 | defaultConfigurationName = Release; 359 | }; 360 | /* End XCConfigurationList section */ 361 | }; 362 | rootObject = 526F384D1CF2D28600E5D57D /* Project object */; 363 | } 364 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Realtime. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Realtime. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "ipad", 5 | "size" : "29x29", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "ipad", 10 | "size" : "29x29", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "ipad", 15 | "size" : "40x40", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "40x40", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "76x76", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "76x76", 31 | "scale" : "2x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/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 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/CellData.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Color 7 | BF6766 8 | Sort 9 | 0 10 | 11 | 12 | Color 13 | A36336 14 | Sort 15 | 1 16 | 17 | 18 | Color 19 | 876633 20 | Sort 21 | 2 22 | 23 | 24 | Color 25 | 6C6A2D 26 | Sort 27 | 3 28 | 29 | 30 | Color 31 | 268785 32 | Sort 33 | 4 34 | 35 | 36 | Color 37 | 82663A 38 | Sort 39 | 5 40 | 41 | 42 | Color 43 | 6699A1 44 | Sort 45 | 6 46 | 47 | 48 | Color 49 | 2EA9DF 50 | Sort 51 | 7 52 | 53 | 54 | Color 55 | C7802D 56 | Sort 57 | 8 58 | 59 | 60 | Color 61 | A0674B 62 | Sort 63 | 9 64 | 65 | 66 | Color 67 | 268785 68 | Sort 69 | 10 70 | 71 | 72 | Color 73 | F7C242 74 | Sort 75 | 11 76 | 77 | 78 | Color 79 | B481BB 80 | Sort 81 | 12 82 | 83 | 84 | Color 85 | F19483 86 | Sort 87 | 13 88 | 89 | 90 | Color 91 | 592C63 92 | Sort 93 | 14 94 | 95 | 96 | Color 97 | 592C63 98 | Sort 99 | 15 100 | 101 | 102 | Color 103 | 373C38 104 | Sort 105 | 16 106 | 107 | 108 | Color 109 | 373C38 110 | Sort 111 | 17 112 | 113 | 114 | Color 115 | BA9132 116 | Sort 117 | 18 118 | 119 | 120 | Color 121 | E1A679 122 | Sort 123 | 19 124 | 125 | 126 | Color 127 | 2B5F75 128 | Sort 129 | 20 130 | 131 | 132 | Color 133 | 877F6C 134 | Sort 135 | 21 136 | 137 | 138 | Color 139 | 986DB2 140 | Sort 141 | 22 142 | 143 | 144 | Color 145 | A8497A 146 | Sort 147 | 23 148 | 149 | 150 | Color 151 | 7B90D2 152 | Sort 153 | 24 154 | 155 | 156 | Color 157 | E16B8C 158 | Sort 159 | 25 160 | 161 | 162 | Color 163 | 00896C 164 | Sort 165 | 26 166 | 167 | 168 | Color 169 | FFFFFB 170 | Sort 171 | 27 172 | 173 | 174 | Color 175 | E9A368 176 | Sort 177 | 28 178 | 179 | 180 | Color 181 | FEDFE1 182 | Sort 183 | 29 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/DTCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCollectionViewCell.h 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Darktt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DTCollectionViewCell : UICollectionViewCell 12 | 13 | + (NSString *)cellIdentifier; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/DTCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTCollectionViewCell.m 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Darktt. All rights reserved. 7 | // 8 | 9 | #import "DTCollectionViewCell.h" 10 | 11 | @implementation DTCollectionViewCell 12 | 13 | + (NSString *)cellIdentifier 14 | { 15 | static NSString *CellIdentifier = @"Cell"; 16 | 17 | return CellIdentifier; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Realtime. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Realtime. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ViewController.h" 11 | 12 | #import "DTCollectionViewCellMover.h" 13 | #import "DTCollectionViewCell.h" 14 | 15 | @interface ViewController () 16 | { 17 | NSMutableArray *_cellColors; 18 | } 19 | 20 | @property (assign, nonatomic) IBOutlet UICollectionView *collectionView; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view, typically from a nib. 30 | 31 | NSString *path = [[NSBundle mainBundle] pathForResource:@"CellData" ofType:@"plist"]; 32 | NSArray *array = [[NSArray alloc] initWithContentsOfFile:path]; 33 | 34 | NSComparisonResult (^comparator) (id, id) = ^NSComparisonResult(NSDictionary *obj1, NSDictionary *obj2) { 35 | NSNumber *number1 = obj1[@"Sort"]; 36 | NSNumber *number2 = obj2[@"Sort"]; 37 | 38 | return [number1 compare:number2]; 39 | }; 40 | 41 | NSArray *sortedArray = [array sortedArrayUsingComparator:comparator]; 42 | 43 | _cellColors = [[NSMutableArray alloc] initWithArray:sortedArray]; 44 | [array release]; 45 | 46 | DTCollectionViewCellMover *cellMover = [DTCollectionViewCellMover cellMoverWithDelegate:self]; 47 | UIEdgeInsets contentInsets = UIEdgeInsetsMake(20.0f, 0.0f, 0.0f, 0.0f); 48 | 49 | [self.collectionView setCellMover:cellMover]; 50 | [self.collectionView setContentInset:contentInsets]; 51 | [self.collectionView setDataSource:self]; 52 | [self.collectionView setDelegate:self]; 53 | } 54 | 55 | - (UIStatusBarStyle)preferredStatusBarStyle 56 | { 57 | return UIStatusBarStyleLightContent; 58 | } 59 | 60 | - (void)dealloc 61 | { 62 | [_cellColors release]; 63 | 64 | [super dealloc]; 65 | } 66 | 67 | - (void)didReceiveMemoryWarning 68 | { 69 | [super didReceiveMemoryWarning]; 70 | // Dispose of any resources that can be recreated. 71 | } 72 | 73 | #pragma mark - UICollectionView DataSource 74 | 75 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section 76 | { 77 | return _cellColors.count; 78 | } 79 | 80 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 81 | { 82 | NSString *cellIdentifier = [DTCollectionViewCell cellIdentifier]; 83 | NSInteger index = indexPath.item; 84 | 85 | UIColor *color = [UIColor colorWithHexString:_cellColors[index][@"Color"]]; 86 | 87 | DTCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath]; 88 | [cell.contentView setBackgroundColor:color]; 89 | 90 | return cell; 91 | } 92 | 93 | #pragma mark - UICollectionViewDelegateFlowLayout 94 | 95 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath 96 | { 97 | CGFloat width = CGRectGetWidth(collectionView.bounds); 98 | CGFloat cellSapceWidth = 10.0f; 99 | 100 | CGFloat numberOfCellInRow = 4.0f; 101 | 102 | CGFloat cellWidth = (width - cellSapceWidth) / numberOfCellInRow - cellSapceWidth; 103 | 104 | return CGSizeMake(cellWidth, cellWidth); 105 | } 106 | 107 | - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section 108 | { 109 | return UIEdgeInsetsMake(10.0f, 10.0f, 10.0f, 10.0f); 110 | } 111 | 112 | #pragma mark - DTCollectionViewCellMoverDelegate 113 | 114 | - (void)cellMover:(DTCollectionViewCellMover *)cellMover willMoveItemFromIndex:(NSInteger)index toIndex:(NSInteger)toIndex; 115 | { 116 | [_cellColors moveObjectAtIndex:index toIndex:toIndex]; 117 | } 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /CollectionViewMoveCellDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CollectionViewMoveCellDemo 4 | // 5 | // Created by EdenLi on 2016/5/23. 6 | // Copyright © 2016年 Realtime. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DTCategories.framework/DTCategories: -------------------------------------------------------------------------------- 1 | Versions/Current/DTCategories -------------------------------------------------------------------------------- /DTCategories.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/DTCategories: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Darktt/CollectionViewCell-Mover/a919d8ccf394c1ea82095d7054711687c60eef39/DTCategories.framework/Versions/A/DTCategories -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/ALAssetsLibrary+SaveAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // ALAssetsLibrary+SaveAsset.h 3 | // 4 | // Created by Darktt on 13/7/24. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import AssetsLibrary; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | typedef void (^ALAssetsLibrarySaveCompletionBlock) ( NSError * _Nullable ); 12 | 13 | @class UIImage; 14 | 15 | @interface ALAssetsLibrary (SaveAsset) 16 | 17 | // Save Image File Into Exist Album. 18 | - (void)saveImageToAlbumWithImage:(UIImage *)image album:(NSString *)albumName completionBlock:(nullable ALAssetsLibrarySaveCompletionBlock)completionBlock; 19 | 20 | // Save Video To Album 21 | - (void)saveVideoToAlbumWithPath:(NSString *)path album:(NSString *)albumName completionBlock:(nullable ALAssetsLibrarySaveCompletionBlock)completionBlock; 22 | 23 | - (void)saveVideoToAlbumWithURL:(NSURL *)resourceURL album:(NSString *)albumName completionBlock:(nullable ALAssetsLibrarySaveCompletionBlock)completionBlock; 24 | 25 | // Add Asset To Exist Album. 26 | - (void)addAssetToAlbumWithAssetURL:(NSURL *)assetURL album:(NSString *)albumName completionBlock:(nullable ALAssetsLibrarySaveCompletionBlock)completionBlock; 27 | 28 | @end 29 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/AVCaptureDevice+CaptureDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // AVCaptureDevice+CaptureDevice.h 3 | // 4 | // Created by Darktt on 15/12/1. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import AVFoundation.AVCaptureDevice; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface AVCaptureDevice (CaptureDevice) 12 | 13 | + (BOOL)hasDeviceWithPosition:(AVCaptureDevicePosition)position NS_SWIFT_NAME(hasDevice(position:)); 14 | 15 | + (instancetype)deviceWithMediaType:(NSString *)mediaType preferringPosition:(AVCaptureDevicePosition)position NS_SWIFT_NAME(device(mediaType:preferringPosition:)); 16 | 17 | @end 18 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/CAMediaTimingFunction+MediaTimingFunction.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAMediaTimingFunction+MediaTimingFunction.h 3 | // 4 | // Created by Darktt on 15/11/24. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import QuartzCore.CAMediaTimingFunction; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface CAMediaTimingFunction (MediaTimingFunction) 12 | 13 | + (instancetype)functionWithControlPoint1:(CGPoint)point1 controlPoint2:(CGPoint)point2; 14 | 15 | - (instancetype)initWithControlPoint1:(CGPoint)point1 controlPoint2:(CGPoint)point2; 16 | 17 | @end 18 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/CGAffineTransformExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGAffineTransformExtension.h 3 | // 4 | // Created by Darktt on 15/1/31. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | #include 9 | @import UIKit.UIKitDefines; 10 | @import CoreGraphics; 11 | 12 | #ifndef CGAffineTransformExtension_h 13 | #define CGAffineTransformExtension_h 14 | 15 | struct CGAffineScale { 16 | CGFloat tx; 17 | CGFloat ty; 18 | }; 19 | typedef struct CGAffineScale CGAffineScale; 20 | 21 | CG_EXTERN NSString *NSStringFromCGAffineScale(CGAffineScale scale); 22 | CG_EXTERN CGFloat ConvertRadiansFromDegrees(CGFloat degrees); 23 | 24 | #pragma mark - CGAffineTransfrom Extension 25 | 26 | CG_EXTERN double CGAffineTransformGetAngle(CGAffineTransform t) CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0); 27 | 28 | CG_EXTERN CGAffineScale CGAffineTransformGetScale(CGAffineTransform t) CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0); 29 | 30 | #endif -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/CGRectExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGRectExtension.h 3 | // 4 | // Created by Darktt on 13/11/5. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import CoreGraphics.CGGeometry; 9 | 10 | CG_INLINE CGPoint CGRectGetOrigin(CGRect rect) 11 | { 12 | return rect.origin; 13 | } 14 | 15 | CG_INLINE CGSize CGRectGetSize(CGRect rect) 16 | { 17 | return rect.size; 18 | } 19 | 20 | CG_INLINE CGPoint CGRectGetCenter(CGRect rect) 21 | { 22 | return CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); 23 | } 24 | 25 | CG_INLINE CGRect CGRectScale(CGRect rect, CGFloat wScale, CGFloat hScale) 26 | { 27 | CGAffineTransform transformScale = CGAffineTransformMakeScale(wScale, hScale); 28 | 29 | return CGRectApplyAffineTransform(rect, transformScale); 30 | } 31 | 32 | CG_INLINE void CGRectSetCenter(CGRect *rect, CGPoint center) 33 | { 34 | CGFloat halfWidth = CGRectGetWidth(*rect) / 2.0f; 35 | CGFloat halfHeight = CGRectGetHeight(*rect) / 2.0f; 36 | 37 | CGRect _rect = *rect; 38 | _rect.origin = CGPointMake(center.x - halfWidth, center.y - halfHeight); 39 | 40 | *rect = _rect; 41 | } -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/CLLocation+Location.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLLocation+Location.h 3 | // 4 | // Created by Darktt on 15/4/20. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import CoreLocation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface CLLocation (Location) 12 | 13 | CL_EXTERN NSString *NSStringFromCLLocationCoordinate2D(CLLocationCoordinate2D coordinate); 14 | 15 | + (instancetype)locationWithCoordinate:(CLLocationCoordinate2D)coordinate; 16 | + (instancetype)locationWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude; 17 | 18 | - (instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate; 19 | 20 | /*! 21 | @method compare: 22 | @param otherLocation 23 | The location for compare. 24 | 25 | @abstract 26 | Compare two locations. 27 | 28 | @result 29 | NSOrderedAscending is two locations not at same point. 30 | NSOrderedSame is two locations at same point. 31 | 32 | */ 33 | - (NSComparisonResult)compare:(CLLocation *)otherLocation; 34 | 35 | - (BOOL)isEqualLocation:(CLLocation *)otherLocation; 36 | 37 | @end 38 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/ColorNames.h: -------------------------------------------------------------------------------- 1 | // 2 | // ColorNames.h 3 | // 4 | // Created by Darktt on 13/4/19. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // Color sample please vist : http://www.w3schools.com/tags/ref_colornames.asp 7 | 8 | #define kAliceBlueColor @"aliceblue" 9 | #define kAntiqueWhiteColor @"antiquewhite" 10 | #define kAquaColor @"aqua" 11 | #define kAquamarineColor @"aquamarine" 12 | #define kAzureColor @"azure" 13 | #define kBeigeColor @"beige" 14 | #define kBisqueColor @"bisque" 15 | #define kBlackColor @"black" 16 | #define kBlanchedAlmondColor @"blanchedalmond" 17 | #define kBlueColor @"blue" 18 | #define kBlueVioletColor @"blueviolet" 19 | #define kBrownColor @"brown" 20 | #define kBurlyWoodColor @"burlywood" 21 | #define kCadetBlueColor @"cadetblue" 22 | #define kChartreuseColor @"chartreuse" 23 | #define kChocolateColor @"chocolate" 24 | #define kCoralColor @"coral" 25 | #define kCornflowerBlueColor @"cornflowerblue" 26 | #define kCornsilkColor @"cornsilk" 27 | #define kCrimsonColor @"crimson" 28 | #define kCyanColor @"cyan" 29 | #define kDarkBlueColor @"darkblue" 30 | #define kDarkCyanColor @"darkcyan" 31 | #define kDarkGoldenRodColor @"darkgoldenrod" 32 | #define kDarkGrayColor @"darkgray" 33 | #define kDarkGreenColor @"darkgreen" 34 | #define kDarkKhakiColor @"darkkhaki" 35 | #define kDarkMagentaColor @"darkmagenta" 36 | #define kDarkOliveGreenColor @"darkolivegreen" 37 | #define kDarkorangeColor @"darkorange" 38 | #define kDarkOrchidColor @"darkorchid" 39 | #define kDarkRedColor @"darkred" 40 | #define kDarkSalmonColor @"darksalmon" 41 | #define kDarkSeaGreenColor @"darkseagreen" 42 | #define kDarkSlateBlueColor @"darkslateblue" 43 | #define kDarkSlateGrayColor @"darkslategray" 44 | #define kDarkTurquoiseColor @"darkturquoise" 45 | #define kDarkVioletColor @"darkviolet" 46 | #define kDeepPinkColor @"deeppink" 47 | #define kDeepSkyBlueColor @"deepskyblue" 48 | #define kDimGrayColor @"dimgray" 49 | #define kDimGreyColor @"dimgrey" 50 | #define kDodgerBlueColor @"dodgerblue" 51 | #define kFireBrickColor @"firebrick" 52 | #define kFloralWhiteColor @"floralwhite" 53 | #define kForestGreenColor @"forestgreen" 54 | #define kFuchsiaColor @"fuchsia" 55 | #define kGainsboroColor @"gainsboro" 56 | #define kGhostWhiteColor @"ghostwhite" 57 | #define kGoldColor @"gold" 58 | #define kGoldenRodColor @"goldenrod" 59 | #define kGrayColor @"gray" 60 | #define kGreenColor @"green" 61 | #define kGreenYellowColor @"greenyellow" 62 | #define kHoneyDewColor @"honeydew" 63 | #define kHotPinkColor @"hotpink" 64 | #define kIndianRedColor @"indianred" 65 | #define kIndigoColor @"indigo" 66 | #define kIvoryColor @"ivory" 67 | #define kKhakiColor @"khaki" 68 | #define kLavenderColor @"lavender" 69 | #define kLavenderBlushColor @"lavenderblush" 70 | #define kLawnGreenColor @"lawngreen" 71 | #define kLemonChiffonColor @"lemonchiffon" 72 | #define kLightBlueColor @"lightblue" 73 | #define kLightCoralColor @"lightcoral" 74 | #define kLightCyanColor @"lightcyan" 75 | #define kLightGoldenRodYellowColor @"lightgoldenrodyellow" 76 | #define kLightGrayColor @"lightgray" 77 | #define kLightGreenColor @"lightgreen" 78 | #define kLightPinkColor @"lightpink" 79 | #define kLightSalmonColor @"lightsalmon" 80 | #define kLightSeaGreenColor @"lightseagreen" 81 | #define kLightSkyBlueColor @"lightskyblue" 82 | #define kLightSlateGrayColor @"lightslategray" 83 | #define kLightSteelBlueColor @"lightsteelblue" 84 | #define kLightYellowColor @"lightyellow" 85 | #define kLimeColor @"lime" 86 | #define kLimeGreenColor @"limegreen" 87 | #define kLinenColor @"linen" 88 | #define kMagentaColor @"magenta" 89 | #define kMaroonColor @"maroon" 90 | #define kMediumAquaMarineColor @"mediumaquamarine" 91 | #define kMediumBlueColor @"mediumblue" 92 | #define kMediumOrchidColor @"mediumorchid" 93 | #define kMediumPurpleColor @"mediumpurple" 94 | #define kMediumSeaGreenColor @"mediumseagreen" 95 | #define kMediumSlateBlueColor @"mediumslateblue" 96 | #define kMediumSpringGreenColor @"mediumspringgreen" 97 | #define kMediumTurquoiseColor @"mediumturquoise" 98 | #define kMediumVioletRedColor @"mediumvioletred" 99 | #define kMidnightBlueColor @"midnightblue" 100 | #define kMintCreamColor @"mintcream" 101 | #define kMistyRoseColor @"mistyrose" 102 | #define kMoccasinColor @"moccasin" 103 | #define kNavajoWhiteColor @"navajowhite" 104 | #define kNavyColor @"navy" 105 | #define kOldLaceColor @"oldlace" 106 | #define kOliveColor @"olive" 107 | #define kOliveDrabColor @"olivedrab" 108 | #define kOrangeColor @"orange" 109 | #define kOrangeRedColor @"orangered" 110 | #define kOrchidColor @"orchid" 111 | #define kPaleGoldenRodColor @"palegoldenrod" 112 | #define kPaleGreenColor @"palegreen" 113 | #define kPaleTurquoiseColor @"paleturquoise" 114 | #define kPaleVioletRedColor @"palevioletred" 115 | #define kPapayaWhipColor @"papayawhip" 116 | #define kPeachPuffColor @"peachpuff" 117 | #define kPeruColor @"peru" 118 | #define kPinkColor @"pink" 119 | #define kPlumColor @"plum" 120 | #define kPowderBlueColor @"powderblue" 121 | #define kPurpleColor @"purple" 122 | #define kRedColor @"red" 123 | #define kRosyBrownColor @"rosybrown" 124 | #define kRoyalBlueColor @"royalblue" 125 | #define kSaddleBrownColor @"saddlebrown" 126 | #define kSalmonColor @"salmon" 127 | #define kSandyBrownColor @"sandybrown" 128 | #define kSeaGreenColor @"seagreen" 129 | #define kSeaShellColor @"seashell" 130 | #define kSiennaColor @"sienna" 131 | #define kSilverColor @"silver" 132 | #define kSkyBlueColor @"skyblue" 133 | #define kSlateBlueColor @"slateblue" 134 | #define kSlateGrayColor @"slategray" 135 | #define kSnowColor @"snow" 136 | #define kSpringGreenColor @"springgreen" 137 | #define kSteelBlueColor @"steelblue" 138 | #define kTanColor @"tan" 139 | #define kTealColor @"teal" 140 | #define kThistleColor @"thistle" 141 | #define kTomatoColor @"tomato" 142 | #define kTurquoiseColor @"turquoise" 143 | #define kVioletColor @"violet" 144 | #define kWheatColor @"wheat" 145 | #define kWhiteColor @"white" 146 | #define kWhiteSmokeColor @"whitesmoke" 147 | #define kYellowColor @"yellow" 148 | #define kYellowGreenColor @"yellowgreen" 149 | -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/DTCategories.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCategories.h 3 | // 4 | // Created by Darktt on 13/1/16. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | // Define Color Name for UIColor+Colors +colorWithColorName:name method 9 | #import "ColorNames.h" 10 | 11 | // Use AVFoundation framework // 12 | #import "AVCaptureDevice+CaptureDevice.h" 13 | 14 | // Use AssetsLibrary framework // 15 | #import "ALAssetsLibrary+SaveAsset.h" 16 | 17 | // Use CoreLocation framework // 18 | #import "CLLocation+Location.h" 19 | 20 | // Use Photos framework // 21 | #import "PHCollection+Collection.h" 22 | #import "PHPhotoLibrary+PhotoLibrary.h" 23 | 24 | // Use QuartzCore framework // 25 | #import "CAMediaTimingFunction+MediaTimingFunction.h" 26 | #import "UIImage+Image.h" 27 | #import "UIImageView+ImageView.h" 28 | 29 | // Use ImageIO framework // 30 | #import "UIImage+ResizeImage.h" 31 | 32 | // No Use framework // 33 | 34 | /* CGAffineTransform */ 35 | #import "CGAffineTransformExtension.h" 36 | 37 | /* CGRect */ 38 | #import "CGRectExtension.h" 39 | 40 | /* NSArray */ 41 | #import "NSArray+Array.h" 42 | #import "NSArray+AroundArray.h" 43 | 44 | /* NSMutableArray */ 45 | #import "NSMutableArray+Array.h" 46 | 47 | /* NSAttributedString */ 48 | #import "NSAttributedString+AttributedString.h" 49 | 50 | /* NSData */ 51 | #import "NSData+Data.h" 52 | 53 | /* NSDate */ 54 | #import "NSDate+Date.h" 55 | #import "NSDate+DateFormatter.h" 56 | 57 | /* NSDateFormatter */ 58 | #import "NSDateFormatter+DateFormatter.h" 59 | 60 | /* NSDictionary */ 61 | #import "NSDictionary+Dictionary.h" 62 | #import "NSDictionary+InfoPlist.h" 63 | 64 | /* NSIndexPath */ 65 | #import "NSIndexPath+IndexPath.h" 66 | 67 | /* NSNumber */ 68 | #import "NSNumber+Mathematica.h" 69 | #import "NSNumber+Ordinal.h" 70 | 71 | /* NSNumberFormatter */ 72 | #import "NSNumberFormatter+DecimalFormater.h" 73 | 74 | /* NSOperationQueue */ 75 | #import "NSOperationQueue+OperationQueue.h" 76 | 77 | /* NSString */ 78 | #import "NSString+String.h" 79 | 80 | /* NSTimeZone */ 81 | #import "NSTimeZone+TimeZone.h" 82 | 83 | /* NSURL */ 84 | #import "NSURL+URL.h" 85 | 86 | /* NSURLSession */ 87 | #import "NSURLSession+URLSession.h" 88 | 89 | /* NSUserDefaults */ 90 | #import "NSUserDefaults+UserDefaults.h" 91 | 92 | /* UIActivityIndicatorView */ 93 | #import "UIActivityIndicatorView+ActivityIndicatorView.h" 94 | 95 | /* UIActivityViewController */ 96 | #import "UIActivityViewController+ActivityViewController.h" 97 | 98 | /* UIApplicationShortcutItem */ 99 | #import "UIApplicationShortcutItem+ShortcutItem.h" 100 | 101 | /* UIBarButtonItem */ 102 | #import "UIBarButtonItem+BarButtonItem.h" 103 | 104 | /* UIButton */ 105 | #import "UIButton+Button.h" 106 | #import "UIButton+Bootstrap.h" 107 | #import "UIButton+GradientColorButton.h" 108 | #import "UIButton+RoundedRectButton.h" 109 | 110 | /* UICollectionView */ 111 | #import "UICollectionView+CollectionView.h" 112 | 113 | /* UIColor */ 114 | #import "UIColor+Colors.h" 115 | #import "UIColor+NipponColors.h" 116 | #import "UIColor+FlatUIColors.h" 117 | 118 | /* UIDevice */ 119 | #import "UIDevice+Device.h" 120 | #import "UIDevice+Version.h" 121 | 122 | /* UIGestureRecognizer */ 123 | #import "UIGestureRecognizer+GestureRecognizer.h" 124 | 125 | /* UIImage */ 126 | #import "UIImage+DrawImage.h" 127 | #import "UIImage+Resize.h" 128 | #import "UIImage+ColorPicker.h" 129 | 130 | /* UIImageView */ 131 | #import "UIImageView+ImageView.h" 132 | 133 | /* UILabel */ 134 | #import "UILabel+Label.h" 135 | 136 | /* UIMotionEffect */ 137 | #import "UIMotionEffect+MotionEffect.h" 138 | 139 | /* UIMutableUserNotificationAction */ 140 | #import "UIMutableUserNotificationAction+UserNotificationAction.h" 141 | 142 | /* UIMutableUserNotificationCategory */ 143 | #import "UIMutableUserNotificationCategory+UserNotificationCategory.h" 144 | 145 | /* UINavigationController */ 146 | #import "UINavigationController+Navigation.h" 147 | 148 | /* UIPageControl */ 149 | #import "UIPageControl+PageControl.h" 150 | 151 | /* UIPickerView */ 152 | #import "UIPickerView+PickerView.h" 153 | 154 | /* UIRefreshControl */ 155 | #import "UIRefreshControl+RefreshControl.h" 156 | 157 | /* UIScrollView */ 158 | #import "UIScrollView+ScrollView.h" 159 | 160 | /* UISearchBar */ 161 | #import "UISearchBar+SearchBar.h" 162 | 163 | /* UISegmentedControl */ 164 | #import "UISegmentedControl+SegmentedControl.h" 165 | 166 | /* UISplitViewController */ 167 | #import "UISplitViewController+SplitView.h" 168 | 169 | /* UISwitch */ 170 | #import "UISwitch+Switch.h" 171 | 172 | /* UITabBarController */ 173 | #import "UITabBarController+TabBar.h" 174 | 175 | /* UITableView */ 176 | #import "UITableView+TableView.h" 177 | 178 | /* UITextField */ 179 | #import "UITextField+TextField.h" 180 | 181 | /* UITextView */ 182 | #import "UITextView+TextView.h" 183 | 184 | /* UIToolbar */ 185 | #import "UIToolbar+Toolbar.h" 186 | 187 | /* UIView */ 188 | #import "UIView+View.h" 189 | #import "UIView+Wobble.h" 190 | 191 | /* UIViewController */ 192 | #import "UIViewController+ViewController.h" 193 | 194 | /* UIVisualEffectView */ 195 | #import "UIVisualEffectView+VisualEffectView.h" 196 | 197 | /* UIWebView */ 198 | #import "UIWebView+WebView.h" 199 | 200 | /* UIWindow */ 201 | #import "UIWindow+Window.h" -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSArray+AroundArray.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+AroundArray.h 3 | // 4 | // Created by Darktt on 13/3/22. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSArray (AroundArray) 12 | 13 | // Get object of index for infinity index. 14 | - (ObjectType)aroundObjectAtIndex:(NSInteger)index NS_SWIFT_NAME(aroundObject(atIndex:)); 15 | 16 | - (ObjectType)aroundObjectAtIndex:(NSInteger)index offset:(nullable NSInteger *)offset NS_SWIFT_UNAVAILABLE("Does not support Swift vesrion."); 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSArray+Array.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Array.h 3 | // 4 | // Created by Darktt on 15/5/19. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | typedef void (^NSArrayEnumerateBlock) (id obj, NSUInteger idx, BOOL *stop); 12 | 13 | @interface NSArray (Array) 14 | 15 | - (BOOL)containsString:(NSString *)aString; 16 | 17 | // Revert array content object. 18 | - (NSArray *)reverseArray; 19 | 20 | - (NSArray *)objectsFromRange:(NSRange)range NS_SWIFT_NAME(objects(fromRange:)); 21 | 22 | @end 23 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSAttributedString+AttributedString.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedString+AttributedString.h 3 | // 4 | // Created by Darktt on 14/12/30. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSAttributedString (AttributedString) 12 | 13 | + (instancetype)attributedStringWithString:(NSString *)string; 14 | + (instancetype)attributedStringWithString:(NSString *)string attributes:(NSDictionary *)attributes; 15 | + (instancetype)attributedStringWithString:(NSString *)string fontSize:(CGFloat)fontSize; 16 | + (instancetype)attributedStringWithString:(NSString *)string foregoundColor:(UIColor *)foregoundColor; 17 | + (instancetype)attributedStringWithString:(NSString *)string fontSize:(CGFloat)fontSize foregoundColor:(UIColor *)foregoundColor; 18 | 19 | @end 20 | 21 | @interface NSAttributedString (StrikethroughStyle) 22 | 23 | + (instancetype)strikethroughStringWithString:(NSString *)string; 24 | + (instancetype)strikethroughStringWithString:(NSString *)string fontSize:(CGFloat)fontSize; 25 | + (instancetype)strikethroughStringWithString:(NSString *)string foregoundColor:(UIColor *)foregoundColor; 26 | + (instancetype)strikethroughStringWithString:(NSString *)string fontSize:(CGFloat)fontSize foregoundColor:(UIColor *)foregoundColor;; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSData+Data.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Data.h 3 | // 4 | // Created by Darktt on 14/2/18. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSData (Data) 12 | 13 | - (NSString *)detailDescription; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSDate+Date.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+Date.h 3 | // 4 | // Created by Darktt on 13/12/23. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSDate (Date) 12 | 13 | // Past date 14 | - (NSDate *)pastDateForDays:(NSInteger)days NS_SWIFT_NAME(pastDate(forDays:)); 15 | - (NSDate *)pastDateForMonths:(NSInteger)months NS_SWIFT_NAME(pastDate(forMonths:)); 16 | - (NSDate *)pastDateForYears:(NSInteger)years NS_SWIFT_NAME(pastDate(forYears:)); 17 | 18 | // Future date 19 | - (NSDate *)futureDateForDays:(NSInteger)days NS_SWIFT_NAME(futureDate(forDays:)); 20 | - (NSDate *)futureDateForMonths:(NSInteger)months NS_SWIFT_NAME(futureDate(forMonths:)); 21 | - (NSDate *)futureDateForYears:(NSInteger)years NS_SWIFT_NAME(futureDate(forYears:)); 22 | 23 | // Get date for nearest minites. 24 | - (NSDate *)nearestMinutes:(NSTimeInterval)minites; 25 | 26 | // Time interval string. 27 | - (NSString *)timeIntervalStringSinceDate:(NSDate *)anotherDate; 28 | - (NSString *)timeIntervalStringSinceNow; 29 | 30 | @end 31 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSDate+DateFormatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+DateFormatter.h 3 | // 4 | // Created by Darktt on 13/12/31. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSDate (DateFormatter) 12 | 13 | @property (readonly, getter=isLeapYear) BOOL leapYear; 14 | 15 | + (BOOL)isLeapYear:(NSInteger)year; 16 | 17 | /* Convert NSString type date string to NSDate */ 18 | + (instancetype _Nullable)dateFromString:(NSString *)dateString format:(NSString *)format; 19 | 20 | /* Get NSString type date */ 21 | + (NSString *)getDateStringWithFormat:(NSString *)format; 22 | 23 | - (NSString *)stringWithFormat:(NSString *)format; 24 | 25 | // Time 26 | 27 | /* Current Time, Like 10:20:52 (format: HH:mm:ss) */ 28 | - (NSString *)getCurrentTime; 29 | 30 | - (NSString *)getSecond; 31 | - (NSString *)getMinute; 32 | - (NSString *)getHour; 33 | 34 | // Date 35 | 36 | /* Current Date, Like 10/15 (format: MM/dd) */ 37 | - (NSString *)getCurrentDate; 38 | 39 | - (NSString *)getDay; 40 | - (NSString *)getMonth; 41 | - (NSString *)getShortMonth; 42 | - (NSString *)getLongMonth; 43 | - (NSString *)getShortWeek; 44 | - (NSString *)getLongWeek; 45 | - (NSString *)getShortYear; 46 | - (NSString *)getLongYear; 47 | 48 | /** 49 | * Get days in given month 50 | * 51 | * @param month The month of current year, range is 1 ~ 12. 52 | * 53 | * @return Number of days. 54 | */ 55 | + (NSUInteger)daysInMonth:(NSUInteger)month; 56 | 57 | + (NSUInteger)daysInYear:(NSUInteger)year; 58 | 59 | @end 60 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSDateFormatter+DateFormatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDateFormatter+DateFormatter.h 3 | // DTTest 4 | // 5 | // Created by EdenLi on 2016/1/28. 6 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface NSDateFormatter (DateFormatter) 13 | 14 | + (instancetype)sharedDateFormatter; 15 | + (instancetype)dateFormatterWithFormat:(NSString *)format; 16 | + (instancetype)dateFormatterWithFormat:(NSString *)format timeZone:(nullable NSTimeZone *)timeZone; 17 | + (instancetype)dateFormatterWithFormat:(NSString *)format timeZone:(nullable NSTimeZone *)timeZone locate:(nullable NSLocale *)locate; 18 | 19 | @end 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSDictionary+Dictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+Dictionary.h 3 | // 4 | // Created by Darktt on 13/6/5. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | typedef void (^NSDirectoryEnumerateBlock) (id key , id obj, BOOL *stop); 12 | 13 | @interface NSDictionary (Dictionary) 14 | 15 | - (BOOL)hasKey:(KeyType)key; 16 | 17 | @end 18 | 19 | @interface NSDictionary (UIKeyboardUserInformation) 20 | 21 | /// Keyboard frame from UIKeyboardFrameBeginUserInfoKey. 22 | - (CGRect)keyboardFrameBegin; 23 | 24 | /// Keyboard frame from UIKeyboardFrameEndUserInfoKey. 25 | - (CGRect)keyboardFrameEnd; 26 | 27 | /// UIKeyboardAnimationCurveUserInfoKey 28 | - (UIViewAnimationCurve)animationCurve; 29 | 30 | /// UIKeyboardAnimationDurationUserInfoKey 31 | - (NSTimeInterval)animationDuration; 32 | 33 | @end 34 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSDictionary+InfoPlist.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+InfoPlist.h 3 | // CueME 4 | // 5 | // Created by Darktt on 15/7/3. 6 | // Copyright © 2015 realtime. All rights reserved. 7 | // 8 | 9 | @import Foundation; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface NSDictionary (InfoPlist) 13 | 14 | + (instancetype)infoDictionary; 15 | + (instancetype)localizedInfoDictionary; 16 | 17 | - (NSString *)bundleVersion; 18 | - (NSString *)bundleShortVersion; 19 | 20 | - (NSString *)bundleName; 21 | - (NSString *)bundleDisplayName; 22 | 23 | @end 24 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSIndexPath+IndexPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexPath+IndexPath.h 3 | // 4 | // Created by Darktt on 16/3/24. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSIndexPath (IndexPath) 12 | 13 | + (NSArray *)indexPathsWithIndexes:(NSIndexSet *)indexes forSection:(NSInteger)section NS_SWIFT_NAME(indexPaths(withIndexes:forSection:)); 14 | + (NSArray *)indexPathsWithCapacity:(NSUInteger)capacity indexPath:(NSIndexPath *)indexPath NS_SWIFT_NAME(indexPath(capacity:indexPath:)); 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSMutableArray+Array.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+Array.h 3 | // 4 | // Created by Darktt on 15/3/24. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSMutableArray (Array) 12 | 13 | - (void)moveObject:(ObjectType)object toIndex:(NSUInteger)toIndex; 14 | - (void)moveObjectAtIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex NS_SWIFT_NAME(moveObject(atIndex:toIndex:)); 15 | 16 | - (void)replaceObject:(ObjectType)object toObject:(ObjectType)toObject; 17 | - (void)replaceLastObject:(ObjectType)object; 18 | 19 | @end 20 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSNumber+Mathematica.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+Mathematica.h 3 | // 4 | // Created by Darktt on 13/12/20. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | @import CoreGraphics; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface NSNumber (Mathematica) 13 | 14 | - (NSArray *)squareFactorization; 15 | 16 | @end 17 | 18 | @interface NSNumber (CGFloatAddition) 19 | 20 | @property (readonly) CGFloat CGFloatValue; 21 | 22 | + (instancetype)numberWithCGFloat:(CGFloat)floatValue; 23 | - (instancetype)initWithCGFloat:(CGFloat)value; 24 | 25 | @end 26 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSNumber+Ordinal.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+Ordinal.hs 3 | // 4 | // Created by Darktt on 15/4/27. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSNumber (Ordinal) 12 | 13 | - (NSString *)ordinalString; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSNumberFormatter+DecimalFormater.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumberFormatter+DecimalFormater.h 3 | // 4 | // Created by Darktt on 16/5/19. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface NSNumberFormatter (DecimalFormater) 11 | 12 | + (instancetype)decimalFormatter; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSOperationQueue+OperationQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSOperationQueue+OperationQueue.h 3 | // 4 | // Created by Darktt on 15/11/19. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | typedef void (^NSOperationQueueBlock) (void); 12 | 13 | extern void RequestMainQueue(NSOperationQueueBlock block); 14 | 15 | @interface NSOperationQueue (OperationQueue) 16 | 17 | + (void)addOperationBlockInMainQueue:(NSOperationQueueBlock)block; 18 | 19 | @end 20 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSString+String.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+String.h 3 | // 4 | // Created by Darktt on 12/12/30. 5 | // Copyright © 2012 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | @import CoreGraphics; 10 | @import CoreLocation; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | extern NSString *NSStringFromBool(BOOL boolValue); 15 | extern NSString *NSStringFromCLLocationDistance(CLLocationDistance distance, NSLocale *__nullable locale); 16 | 17 | @interface NSString (String) 18 | 19 | @property (readonly, getter = isEmailAddress) BOOL emailAddress; 20 | @property (readonly, getter = isPhoneNumber) BOOL phoneNumber; 21 | 22 | + (instancetype)stringWithInteger:(NSInteger)integer; 23 | + (instancetype)stringWithFloat:(float)floatValue numberOfDecimalPlaces:(NSUInteger)decimal; 24 | 25 | + (instancetype _Nullable)jsonStringWithObject:(id)object error:(NSError * _Nullable * _Nullable)error NS_SWIFT_NAME(jsonString(object:)); 26 | + (instancetype _Nullable)jsonStringWithArray:(NSArray *)array error:(NSError * _Nullable * _Nullable)error NS_SWIFT_NAME(jsonString(_:)); 27 | + (instancetype _Nullable)jsonStringWithDictionary:(NSDictionary *)dictionary error:(NSError * _Nullable * _Nullable)error NS_SWIFT_NAME(jsonString(_:)); 28 | 29 | - (instancetype)initWithInteger:(NSInteger)integer; 30 | - (instancetype)initWithFloat:(float)floatValue numberOfDecimalPlaces:(NSUInteger)decimal; 31 | 32 | - (BOOL)containString:(NSString *)string; 33 | - (BOOL)hasPrefix:(NSString *)prefix caseInsensitive:(BOOL)caseInsensitive; 34 | - (BOOL)hasSuffix:(NSString *)suffix caseInsensitive:(BOOL)caseInsensitive; 35 | - (BOOL)isAddressWithError:(NSError * __nullable * __nullable)error; 36 | 37 | - (NSString *)lowercasePathExtension; 38 | - (NSString *)stringByTrimmingWithFromString:(NSString *)fromString toString:(NSString *)toString; 39 | - (NSString *)stringByAddingPercentEncoding; 40 | 41 | - (long long)hexLongLongValue; 42 | - (NSInteger)hexIntegerValue; 43 | 44 | @end 45 | 46 | @interface NSString (BinaryCodedDecimal) 47 | 48 | + (instancetype)stringWithBCDChar:(char *)BCDChar; 49 | - (instancetype)initWithBCDChar:(char *)BCDChar; 50 | 51 | @end 52 | 53 | @interface NSString (MD5) 54 | 55 | - (NSString *)MD5String; 56 | 57 | @end 58 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSTimeZone+TimeZone.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimeZone+TimeZone.h 3 | // DTTest 4 | // 5 | // Created by EdenLi on 2016/3/4. 6 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface NSTimeZone (TimeZone) 13 | 14 | /** 15 | * Coordinated Universal Time 16 | * 17 | * @return The instance of NSTimeZone. 18 | */ 19 | + (instancetype)UTCTimeZone; 20 | 21 | /** 22 | * Japan Standard Time 23 | * 24 | * @return The instance of NSTimeZone. 25 | */ 26 | + (instancetype)JSTTimeZone; 27 | 28 | /** 29 | * China Standard Time, for Taipei(Taiwan), Beijing(China), Shanghai(China), etc. 30 | * 31 | * @return The instance of NSTimeZone. 32 | */ 33 | + (instancetype)CSTTimeZone; 34 | 35 | /** 36 | * Singapore Time 37 | * 38 | * @return The instance of NSTimeZone. 39 | */ 40 | + (instancetype)SGTTimeZone; 41 | 42 | /** 43 | * Hong Kong Time 44 | * 45 | * @return The instance of NSTimeZone. 46 | */ 47 | + (instancetype)HKTTimeZone; 48 | 49 | @end 50 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSURL+URL.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+URL.h 3 | // 4 | // Created by Darktt on 13/8/12. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSURL (URL) 12 | 13 | @property (nonatomic, readonly) NSURL *rootURL; 14 | 15 | + (instancetype)URLWithEncodingString:(NSString *)string; 16 | - (instancetype)initWithEncodingString:(NSString *)string; 17 | 18 | - (BOOL)isRootURL; 19 | 20 | @end 21 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSURLSession+URLSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLSession+URLSession.h 3 | // 4 | // Created by Darktt on 16/1/13. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | typedef void (^NSURLSessionDataTaskHandler)(NSData *__nullable data, NSURLResponse *__nullable response, NSError *__nullable error); 11 | typedef void (^NSURLSessionDownloadTaskHandler)(NSURL * __nullable location, NSURLResponse * __nullable response, NSError * __nullable error); 12 | 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | @interface NSURLSession (URLSession) 16 | 17 | + (instancetype)defaultSession; 18 | + (instancetype)defaultSessionWithQueue:(NSOperationQueue *)queue NS_SWIFT_NAME(defaultSession(queue:)); 19 | + (instancetype)defaultSessionWithDelegate:(id)delegate NS_SWIFT_NAME(defaultSession(delegate:)); 20 | + (instancetype)defaultSessionWithDelegate:(nullable id)delegate delegateQueue:(NSOperationQueue *)delegateQueue NS_SWIFT_NAME(defaultSession(delegate:queue:)); 21 | 22 | @end 23 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/NSUserDefaults+UserDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSUserDefaults+UserDefaults.h 3 | // 4 | // Created by Darktt on 15/11/18. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Foundation; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface NSUserDefaults (UserDefaults) 12 | 13 | - (nullable id)objectForKeyedSubscript:(NSString *)key; 14 | - (void)setObject:(nullable id)object forKeyedSubscript:(NSString *)key; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/PHCollection+Collection.h: -------------------------------------------------------------------------------- 1 | // 2 | // PHCollection+Collection.h 3 | // 4 | // Created by Darktt on 14/11/4. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Photos.PHCollection; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface PHCollection (Collection) 12 | 13 | // Fetch create by user collections. 14 | + (PHFetchResult *)fetchTopLevelUserCollectionsWithName:(NSString *)name; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/PHPhotoLibrary+PhotoLibrary.h: -------------------------------------------------------------------------------- 1 | // 2 | // PHPhotoLibrary+PhotoLibrary.h 3 | // 4 | // Created by Darktt on 14/11/4. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import Photos.PHPhotoLibrary; 9 | 10 | @class UIImage; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | typedef dispatch_block_t PHPhotoLibraryCompletionHandler; 14 | typedef void (^PHPhotoLibraryAccessFailureHandler) (BOOL success, NSError * _Nullable error); 15 | 16 | @interface PHPhotoLibrary (PhotoLibrary) 17 | 18 | // Create collection (aka album). will not check the collection name is exist. 19 | - (void)createCollectionWithName:(NSString *)name completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 20 | 21 | // Add image to camera roll. 22 | - (void)addImage:(UIImage *)image completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 23 | - (void)addImageAtFileURL:(NSURL *)fileURL completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 24 | 25 | // Add video to camera roll. 26 | - (void)addVideoAtFileURL:(NSURL *)fileURL completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 27 | 28 | // Add image to collection. 29 | - (void)addImage:(UIImage *)image toCollectionWithName:(NSString *)collectionName completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 30 | - (void)addImageAtFileURL:(NSURL *)fileURL toCollectionWithName:(NSString *)collectionName completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 31 | 32 | // Add video to collection. 33 | - (void)addVideoAtFileURL:(NSURL *)fileURL toCollectionWithName:(NSString *)collectionName completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 34 | 35 | // Delete assets from camera roll. 36 | - (void)deleteAssets:(id)assets completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler )failureHandler; 37 | 38 | // Remove assets from collection. 39 | - (void)removeAssets:(id)assets fromCollectionWithName:(NSString *)collectionName completionHandler:(PHPhotoLibraryCompletionHandler _Nullable)completionHandler failureHandle:(PHPhotoLibraryAccessFailureHandler _Nullable)failureHandler; 40 | 41 | @end 42 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIActivityIndicatorView+ActivityIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIActivityIndicatorView+ActivityIndicatorView.h 3 | // 4 | // Created by Darktt on 16/3/24. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIActivityIndicatorView (ActivityIndicatorView) 12 | 13 | + (instancetype)activityIndicatorViewWithStyle:(UIActivityIndicatorViewStyle)style; 14 | 15 | + (UIActivityIndicatorView * _Nullable)activityIndicatorViewInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(activityIndicatorView(inView:tag:)); 16 | 17 | @end 18 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIActivityViewController+ActivityViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIActivityViewController+ActivityViewController.h 3 | // 4 | // Created by Darktt on 16/3/16. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIActivityViewController (ActivityViewController) 12 | 13 | + (instancetype)activityViewControllerWithActivityItems:(NSArray *)activityItems applicationActivities:(nullable NSArray<__kindof UIActivity *> *)applicationActivities; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIApplicationShortcutItem+ShortcutItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplicationShortcutItem+ShortcutItem.h 3 | // 4 | // Created by Darktt on 15/11/12. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIApplicationShortcutItem (ShortcutItem) 12 | 13 | + (instancetype)shortcutItemWithType:(NSString *)type localizedTitle:(NSString *)localizedTitle; 14 | + (instancetype)shortcutItemWithType:(NSString *)type localizedTitle:(NSString *)localizedTitle localizedSubtitle:( nullable NSString *)localizedSubtitle icon:(nullable UIApplicationShortcutIcon *)icon userInfo:(nullable NSDictionary *)userInfo; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIBarButtonItem+BarButtonItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+BarButtonItem.h 3 | // 4 | // Created by Darktt on 13/12/24. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIBarButtonItem (BarButtonItem) 12 | 13 | + (instancetype)flexibleSpace; 14 | + (instancetype)fixedSpaceWithWidth:(CGFloat)width; 15 | + (instancetype)barButtonItemWithCustomView:(UIView *)customView; 16 | + (instancetype)barButtonSystemItem:(UIBarButtonSystemItem)systemItem target:(nullable id)target action:(nullable SEL)action NS_SWIFT_NAME(systemItem(_:target:action:)); 17 | + (instancetype)barButtonItemWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style target:(nullable id)target action:(nullable SEL)action; 18 | 19 | // Aka +fixedSpaceWithWidth: with -16 width (after iOS7). 20 | + (instancetype)negativeSeparator; 21 | 22 | @end 23 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIButton+Bootstrap.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Bootstrap.h 3 | // 4 | // Created by Darktt on 13/10/14. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | typedef NS_ENUM(NSInteger, DTBootstrapStyle) { 11 | DTBootstrapStyleDefault = 0, 12 | DTBootstrapStylePrimary, 13 | DTBootstrapStyleSuccess, 14 | DTBootstrapStyleInfo, 15 | DTBootstrapStyleWarning, 16 | DTBootstrapStyleDanger 17 | }; 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | @interface UIButton (Bootstrap) 21 | 22 | + (instancetype)bootstrapButtonWithFrame:(CGRect)frame style:(DTBootstrapStyle)style NS_SWIFT_NAME(bootstrapButton(frame:style:)); 23 | - (instancetype)initWithFrame:(CGRect)frame style:(DTBootstrapStyle)style; 24 | 25 | @end 26 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIButton+Button.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Button.h 3 | // 4 | // Created by Darktt on 13/10/15. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIButton (Button) 12 | 13 | - (void)setBackgroundImageWithColor:(UIColor *)color forState:(UIControlState)state NS_SWIFT_NAME(setBackgroundImage(color:forState:)); 14 | 15 | // Get button in superview 16 | + (__kindof UIButton * _Nullable)buttonInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(button(inView:tag:)); 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIButton+GradientColorButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+GradientColorButton.h 3 | // 4 | // Created by Darktt on 13/6/6. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIButton (GradientColorButton) 12 | 13 | + (instancetype)blueButtonWithFrame:(CGRect)frame conerRadius:(CGFloat)conerRadius NS_SWIFT_NAME(blueButton(frame:conerRadius:)); 14 | 15 | + (instancetype)grayButtonWithFrame:(CGRect)frame conerRadius:(CGFloat)conerRadius NS_SWIFT_NAME(grayButton(frame:conerRadius:)); 16 | 17 | + (instancetype)greenButtonWithFrame:(CGRect)frame conerRadius:(CGFloat)conerRadius NS_SWIFT_NAME(greenButton(frame:conerRadius:)); 18 | 19 | + (instancetype)purpleButtonWithFrame:(CGRect)frame conerRadius:(CGFloat)conerRadius NS_SWIFT_NAME(purpleButton(frame:conerRadius:)); 20 | 21 | + (instancetype)redButtonWithFrame:(CGRect)frame conerRadius:(CGFloat)conerRadius NS_SWIFT_NAME(redButton(frame:conerRadius:)); 22 | 23 | @end 24 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIButton+RoundedRectButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+RoundedRectButton.h 3 | // 4 | // Created by Darktt on 14/7/31. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIButton (RoundedRectButton) 12 | 13 | + (instancetype)roundRectButtonWithFrame:(CGRect)frame byRoundingCorners:(UIRectCorner)corners NS_SWIFT_NAME(roundRectButton(frame:roundingCorners:)); 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UICollectionView+CollectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView+CollectionView.h 3 | // 4 | // Created by Darktt on 15/7/3. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UICollectionView (CollectionView) 12 | 13 | + (instancetype)collectionViewWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout; 14 | 15 | - (void)reloadItem:(NSUInteger)item inSection:(NSUInteger)section; 16 | - (void)reloadSection:(NSUInteger)section; 17 | 18 | - (void)insertItem:(NSUInteger)item inSection:(NSUInteger)section; 19 | - (void)insertSection:(NSUInteger)section; 20 | 21 | - (void)deleteItem:(NSUInteger)item inSection:(NSUInteger)section; 22 | - (void)deleteSection:(NSUInteger)section; 23 | 24 | - (void)scrollToItem:(NSUInteger)item inSection:(NSUInteger)section atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated; 25 | 26 | // Get collectionView in superview 27 | + (__kindof UICollectionView * _Nullable)collectionViewInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(collectionView(inView:tag:)); 28 | 29 | @end 30 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIColor+Colors.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Colors.h 3 | // 4 | // Created by Darktt on 12/10/17. 5 | // Copyright © 2012 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | UIKIT_EXTERN UIColor * UIColorFromRGB(NSInteger r, NSInteger g, NSInteger b) NS_SWIFT_UNAVAILABLE("Does not support Swift."); 12 | 13 | UIKIT_EXTERN UIColor * UIColorFromRGBA(NSInteger r, NSInteger g, NSInteger b, NSInteger a) NS_SWIFT_UNAVAILABLE("Does not support Swift."); 14 | 15 | @interface UIColor (Colors) 16 | 17 | // Random color 18 | + (UIColor *)randomColor; 19 | 20 | // Custom colors 21 | + (UIColor *)baseWhiteColor; 22 | + (UIColor *)lightBrownColor; 23 | 24 | + (UIColor *)facebookColor; // Facebook blue base color 25 | + (UIColor *)deepFacebookColor; // Facebook blue base color from Facebook App ver. 6.5 26 | + (UIColor *)twitterColor; // Twitter blue base color 27 | + (UIColor *)googleRedColor; // Google logo red color 28 | + (UIColor *)googleGreenColor; // Google logo green color 29 | + (UIColor *)googleBlueColor; // Google logo blue color 30 | + (UIColor *)googleYellowColor; // Google logo yellow color 31 | + (UIColor *)yahooRedColor; // Yahoo red color 32 | + (UIColor *)netEaseRedColor; // Netease (網易) red color 33 | + (UIColor *)windows8BlueColor; // Microsoft Windows 8 base blue color. 34 | + (UIColor *)togoBoxGrayColor; // Aximcom TOGOBox gray color 35 | + (UIColor *)togoBoxGreenColor; // Aximcom TOGOBox green color 36 | + (UIColor *)togoBoxPurpleColor; // Aximcom TOGOBox purple color 37 | + (UIColor *)iOS7WhiteColor; // iOS 7 style white color 38 | + (UIColor *)iOS7BlueColor; // iOS 7 style blue color 39 | 40 | // Flat Colors 41 | + (UIColor *)flatRedColor; 42 | + (UIColor *)flatDarkRedColor; 43 | 44 | + (UIColor *)flatGreenColor; 45 | + (UIColor *)flatDarkGreenColor; 46 | 47 | + (UIColor *)flatBlueColor; 48 | + (UIColor *)flatDarkBlueColor; 49 | 50 | + (UIColor *)flatTealColor; 51 | + (UIColor *)flatDarkTealColor; 52 | 53 | + (UIColor *)flatPurpleColor; 54 | + (UIColor *)flatDarkPurpleColor; 55 | 56 | + (UIColor *)flatBlackColor; 57 | + (UIColor *)flatDarkBlackColor; 58 | 59 | + (UIColor *)flatYellowColor; 60 | + (UIColor *)flatDarkYellowColor; 61 | 62 | + (UIColor *)flatOrangeColor; 63 | + (UIColor *)flatDarkOrangeColor; 64 | 65 | + (UIColor *)flatWhiteColor; 66 | + (UIColor *)flatDarkWhiteColor; 67 | 68 | + (UIColor *)flatGrayColor; 69 | + (UIColor *)flatDarkGrayColor; 70 | 71 | // Fork from KXKiOS7Colors, as iOS7 icon used colors. 72 | + (UIColor *)iOS7LightGreenColor; 73 | + (UIColor *)iOS7MidGreenColor; 74 | + (UIColor *)iOS7DarkGreenColor; 75 | 76 | + (UIColor *)iOS7LightGreyColor; 77 | + (UIColor *)iOS7DarkGreyColor; 78 | 79 | + (UIColor *)iOS7LightBlueColor; 80 | + (UIColor *)iOS7MidBlueColor; 81 | + (UIColor *)iOS7DarkBlueColor; 82 | 83 | + (UIColor *)iOS7LightPinkColor; 84 | + (UIColor *)iOS7DarkPinkColor; 85 | 86 | + (UIColor *)iOS7RedColor; 87 | 88 | + (UIColor *)iOS7LightOrangeColor; 89 | + (UIColor *)iOS7DarkOrangeColor; 90 | 91 | + (UIColor *)iOS7LightTealColor; 92 | 93 | + (UIColor *)iOS7LightPurpleColor; 94 | + (UIColor *)iOS7DarkPurpleColor; 95 | 96 | + (UIColor *)iOS7BrownColor; 97 | + (UIColor *)iOS7YellowColor; 98 | 99 | // Input hexadecimal string or integer 100 | + (instancetype)colorWithHex:(UInt32)hex; // eg: [UIColor colorWithHex:0xff00ff]; 101 | + (instancetype)colorWithHexString:(NSString *)hex; // eg: [UIColor colorWithHexString:@"ff00ff"]; 102 | - (instancetype)initWithHexString:(NSString *)hex; // eg: [[UIColor alloc] initWithHexString:@"ff00ff"]; 103 | 104 | // Input color name with safe web color names 105 | // Color names is define in ColorNames.h file 106 | + (UIColor *)colorWithColorName:(NSString *)name; 107 | 108 | // Input RGB value, without alpha value. 109 | + (UIColor *)colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue; 110 | - (instancetype)initWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue; 111 | 112 | // return Color RGB value. 113 | // eg: [UIColor colorComponentsFromColor:[UIColor redColor]]; 114 | // Output : "Red : 255, Green : 0, Blue : 0, Alpha : 100" 115 | + (NSArray *)colorComponentsFromColor:(UIColor *)color NS_SWIFT_UNAVAILABLE("Use UIColor.colorComponets()"); 116 | - (NSArray *)colorComponents; 117 | 118 | @end 119 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIColor+FlatUIColors.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+FlatUIColors.h 3 | // DTTest 4 | // 5 | // Created by Darktt on 14/4/26. 6 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 7 | // 8 | // Color Sample : http://flatuicolors.com/ 9 | 10 | @import UIKit; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | @interface UIColor (FlatUIColors) 14 | 15 | + (UIColor *)turquoiseColor; 16 | + (UIColor *)greenSeaColor; 17 | 18 | + (UIColor *)emeraldColor; 19 | + (UIColor *)nephritisColor; 20 | 21 | + (UIColor *)peterRiverColor; 22 | + (UIColor *)belizeHoleColor; 23 | 24 | + (UIColor *)amethystColor; 25 | + (UIColor *)wisteriaColor; 26 | 27 | + (UIColor *)wetAsphaltColor; 28 | + (UIColor *)midnightBlueColor; 29 | 30 | + (UIColor *)sunFlowerColor; 31 | 32 | // Because UIColor have +orangeColor, so add prefix flat to this color. 33 | + (UIColor *)flatOrangeColor; 34 | 35 | + (UIColor *)carrotColor; 36 | + (UIColor *)pumpkinColor; 37 | 38 | + (UIColor *)alizarinColor; 39 | + (UIColor *)pomegranateColor; 40 | 41 | + (UIColor *)cloudsColor; 42 | + (UIColor *)silverColor; 43 | 44 | + (UIColor *)concreteColor; 45 | + (UIColor *)asbestosColor; 46 | 47 | @end 48 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIColor+NipponColors.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+NipponColors.h 3 | // 4 | // Created by Darktt on 15/04/02. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIColor (NipponColors) 12 | 13 | /// #1 撫子 14 | + (UIColor *)nadeshikoColor; 15 | 16 | /// #2 紅梅 17 | + (UIColor *)kohbaiColor; 18 | 19 | /// #3 蘇芳 20 | + (UIColor *)suohColor; 21 | 22 | /// #4 退紅 23 | + (UIColor *)taikohColor; 24 | 25 | /// #5 一斥染 26 | + (UIColor *)ikkonzomeColor; 27 | 28 | /// #6 桑染 29 | + (UIColor *)kuwazomeColor; 30 | 31 | /// #7 桃 32 | + (UIColor *)momoColor; 33 | 34 | /// #8 苺 35 | + (UIColor *)ichigoColor; 36 | 37 | /// #9 薄紅 38 | + (UIColor *)usubeniColor; 39 | 40 | /// #10 今様 41 | + (UIColor *)imayohColor; 42 | 43 | /// #11 中紅 44 | + (UIColor *)nakabeniColor; 45 | 46 | /// #12 桜 47 | + (UIColor *)sakuraColor; 48 | 49 | /// #13 梅鼠 50 | + (UIColor *)umenezumiColor; 51 | 52 | /// #14 韓紅花 53 | + (UIColor *)karakurenaiColor; 54 | 55 | /// #15 燕脂 56 | + (UIColor *)enjiColor; 57 | 58 | /// #16 紅 59 | + (UIColor *)kurenaiColor; 60 | 61 | /// #17 鴇 62 | + (UIColor *)tokiColor; 63 | 64 | /// #18 長春 65 | + (UIColor *)cyohsyunColor; 66 | 67 | /// #19 深緋 68 | + (UIColor *)kokiakeColor; 69 | 70 | /// #20 桜鼠 71 | + (UIColor *)sakuranezumiColor; 72 | 73 | /// #21 甚三紅 74 | + (UIColor *)jinzamomiColor; 75 | 76 | /// #22 小豆 77 | + (UIColor *)azukiColor; 78 | 79 | /// #23 蘇芳香 80 | + (UIColor *)suohkohColor; 81 | 82 | /// #24 赤紅 83 | + (UIColor *)akabeniColor; 84 | 85 | /// #25 真朱 86 | + (UIColor *)shinsyuColor; 87 | 88 | /// #26 灰桜 89 | + (UIColor *)haizakuraColor; 90 | 91 | /// #27 栗梅 92 | + (UIColor *)kuriumeColor; 93 | 94 | /// #28 海老茶 95 | + (UIColor *)ebichaColor; 96 | 97 | /// #29 銀朱 98 | + (UIColor *)ginsyuColor; 99 | 100 | /// #30 黒鳶 101 | + (UIColor *)kurotobiColor; 102 | 103 | /// #31 紅鳶 104 | + (UIColor *)benitobiColor; 105 | 106 | /// #32 曙 107 | + (UIColor *)akebonoColor; 108 | 109 | /// #33 紅樺 110 | + (UIColor *)benikabaColor; 111 | 112 | /// #34 水がき 113 | + (UIColor *)mizugakiColor; 114 | 115 | /// #35 珊瑚朱 116 | + (UIColor *)sangosyuColor; 117 | 118 | /// #36 紅檜皮 119 | + (UIColor *)benihiwadaColor; 120 | 121 | /// #37 猩猩緋 122 | + (UIColor *)syojyohiColor; 123 | 124 | /// #38 鉛丹 125 | + (UIColor *)entanColor; 126 | 127 | /// #39 芝翫茶 128 | + (UIColor *)shikanchaColor; 129 | 130 | /// #40 檜皮 131 | + (UIColor *)hiwadaColor; 132 | 133 | /// #41 柿渋 134 | + (UIColor *)kakishibuColor; 135 | 136 | /// #42 緋 137 | + (UIColor *)akeColor; 138 | 139 | /// #43 鳶 140 | + (UIColor *)tobiColor; 141 | 142 | /// #44 紅緋 143 | + (UIColor *)benihiColor; 144 | 145 | /// #45 栗皮茶 146 | + (UIColor *)kurikawachaColor; 147 | 148 | /// #46 弁柄 149 | + (UIColor *)bengaraColor; 150 | 151 | /// #47 照柿 152 | + (UIColor *)terigakiColor; 153 | 154 | /// #48 江戸茶 155 | + (UIColor *)edochaColor; 156 | 157 | /// #49 洗朱 158 | + (UIColor *)araisyuColor; 159 | 160 | /// #50 百塩茶 161 | + (UIColor *)momoshiochaColor; 162 | 163 | /// #51 唐茶 164 | + (UIColor *)karachaColor; 165 | 166 | /// #52 ときがら茶 167 | + (UIColor *)tokigarachaColor; 168 | 169 | /// #53 黄丹 170 | + (UIColor *)ohniColor; 171 | 172 | /// #54 纁 173 | + (UIColor *)sohiColor; 174 | 175 | /// #55 遠州茶 176 | + (UIColor *)ensyuchaColor; 177 | 178 | /// #56 樺茶 179 | + (UIColor *)kabachaColor; 180 | 181 | /// #57 焦茶 182 | + (UIColor *)kogechaColor; 183 | 184 | /// #58 赤香 185 | + (UIColor *)akakohColor; 186 | 187 | /// #59 雀茶 188 | + (UIColor *)suzumechaColor; 189 | 190 | /// #60 宍 191 | + (UIColor *)shishiColor; 192 | 193 | /// #61 宗伝唐茶 194 | + (UIColor *)sodenkarachaColor; 195 | 196 | /// #62 樺 197 | + (UIColor *)kabaColor; 198 | 199 | /// #63 深支子 200 | + (UIColor *)kokikuchinashiColor; 201 | 202 | /// #64 胡桃 203 | + (UIColor *)kurumiColor; 204 | 205 | /// #65 代赭 206 | + (UIColor *)taisyaColor; 207 | 208 | /// #66 洗柿 209 | + (UIColor *)araigakiColor; 210 | 211 | /// #67 黄櫨染 212 | + (UIColor *)kohrozenColor; 213 | 214 | /// #68 赤朽葉 215 | + (UIColor *)akakuchibaColor; 216 | 217 | /// #69 礪茶 218 | + (UIColor *)tonochaColor; 219 | 220 | /// #70 赤白橡 221 | + (UIColor *)akashirotsurubamiColor; 222 | 223 | /// #71 煎茶 224 | + (UIColor *)senchaColor; 225 | 226 | /// #72 萱草 227 | + (UIColor *)kanzoColor; 228 | 229 | /// #73 洒落柿 230 | + (UIColor *)sharegakiColor; 231 | 232 | /// #74 紅鬱金 233 | + (UIColor *)beniukonColor; 234 | 235 | /// #75 梅染 236 | + (UIColor *)umezomeColor; 237 | 238 | /// #76 枇杷茶 239 | + (UIColor *)biwachaColor; 240 | 241 | /// #77 丁子茶 242 | + (UIColor *)chojichaColor; 243 | 244 | /// #78 憲法染 245 | + (UIColor *)kenpohzomeColor; 246 | 247 | /// #79 琥珀 248 | + (UIColor *)kohakuColor; 249 | 250 | /// #80 薄柿 251 | + (UIColor *)usugakiColor; 252 | 253 | /// #81 伽羅 254 | + (UIColor *)kyaraColor; 255 | 256 | /// #82 丁子染 257 | + (UIColor *)chojizomeColor; 258 | 259 | /// #83 柴染 260 | + (UIColor *)fushizomeColor; 261 | 262 | /// #84 朽葉 263 | + (UIColor *)kuchibaColor; 264 | 265 | /// #85 金茶 266 | + (UIColor *)kinchaColor; 267 | 268 | /// #86 狐 269 | + (UIColor *)kitsuneColor; 270 | 271 | /// #87 煤竹 272 | + (UIColor *)susutakeColor; 273 | 274 | /// #88 薄香 275 | + (UIColor *)usukohColor; 276 | 277 | /// #89 砥粉 278 | + (UIColor *)tonokoColor; 279 | 280 | /// #90 銀煤竹 281 | + (UIColor *)ginsusutakeColor; 282 | 283 | /// #91 黄土 284 | + (UIColor *)ohdoColor; 285 | 286 | /// #92 白茶 287 | + (UIColor *)shirachaColor; 288 | 289 | /// #93 媚茶 290 | + (UIColor *)kobichaColor; 291 | 292 | /// #94 黄唐茶 293 | + (UIColor *)kigarachaColor; 294 | 295 | /// #95 山吹 296 | + (UIColor *)yamabukiColor; 297 | 298 | /// #96 山吹茶 299 | + (UIColor *)yamabukichaColor; 300 | 301 | /// #97 櫨染 302 | + (UIColor *)hajizomeColor; 303 | 304 | /// #98 桑茶 305 | + (UIColor *)kuwachaColor; 306 | 307 | /// #99 玉子 308 | + (UIColor *)tamagoColor; 309 | 310 | /// #100 白橡 311 | + (UIColor *)shirotsurubamiColor; 312 | 313 | /// #101 黄橡 314 | + (UIColor *)kitsurubamiColor; 315 | 316 | /// #102 玉蜀黍 317 | + (UIColor *)tamamorokoshiColor; 318 | 319 | /// #103 花葉 320 | + (UIColor *)hanabaColor; 321 | 322 | /// #104 生壁 323 | + (UIColor *)namakabeColor; 324 | 325 | /// #105 鳥の子 326 | + (UIColor *)torinokoColor; 327 | 328 | /// #106 浅黄 329 | + (UIColor *)usukiColor; 330 | 331 | /// #107 黄朽葉 332 | + (UIColor *)kikuchibaColor; 333 | 334 | /// #108 梔子 335 | + (UIColor *)kuchinashiColor; 336 | 337 | /// #109 籐黄 338 | + (UIColor *)tohohColor; 339 | 340 | /// #110 鬱金 341 | + (UIColor *)ukonColor; 342 | 343 | /// #111 芥子 344 | + (UIColor *)karashiColor; 345 | 346 | /// #112 肥後煤竹 347 | + (UIColor *)higosusutakeColor; 348 | 349 | /// #113 利休白茶 350 | + (UIColor *)rikyushirachaColor; 351 | 352 | /// #114 灰汁 353 | + (UIColor *)akuColor; 354 | 355 | /// #115 利休茶 356 | + (UIColor *)rikyuchaColor; 357 | 358 | /// #116 路考茶 359 | + (UIColor *)rokohchaColor; 360 | 361 | /// #117 菜種油 362 | + (UIColor *)nataneyuColor; 363 | 364 | /// #118 鶯茶 365 | + (UIColor *)uguisuchaColor; 366 | 367 | /// #119 黄海松茶 368 | + (UIColor *)kimiruchaColor; 369 | 370 | /// #120 海松茶 371 | + (UIColor *)miruchaColor; 372 | 373 | /// #121 刈安 374 | + (UIColor *)kariyasuColor; 375 | 376 | /// #122 菜の花 377 | + (UIColor *)nanohanaColor; 378 | 379 | /// #123 黄蘗 380 | + (UIColor *)kihadaColor; 381 | 382 | /// #124 蒸栗 383 | + (UIColor *)mushikuriColor; 384 | 385 | /// #125 青朽葉 386 | + (UIColor *)aokuchibaColor; 387 | 388 | /// #126 女郎花 389 | + (UIColor *)ominaeshiColor; 390 | 391 | /// #127 鶸茶 392 | + (UIColor *)hiwachaColor; 393 | 394 | /// #128 鶸 395 | + (UIColor *)hiwaColor; 396 | 397 | /// #129 鶯 398 | + (UIColor *)uguisuColor; 399 | 400 | /// #130 柳茶 401 | + (UIColor *)yanagichaColor; 402 | 403 | /// #131 苔 404 | + (UIColor *)kokeColor; 405 | 406 | /// #132 麹塵 407 | + (UIColor *)kikujinColor; 408 | 409 | /// #133 璃寛茶 410 | + (UIColor *)rikanchaColor; 411 | 412 | /// #134 藍媚茶 413 | + (UIColor *)aikobichaColor; 414 | 415 | /// #135 海松 416 | + (UIColor *)miruColor; 417 | 418 | /// #136 千歳茶 419 | + (UIColor *)sensaichaColor; 420 | 421 | /// #137 梅幸茶 422 | + (UIColor *)baikochaColor; 423 | 424 | /// #138 鶸萌黄 425 | + (UIColor *)hiwamoegiColor; 426 | 427 | /// #139 柳染 428 | + (UIColor *)yanagizomeColor; 429 | 430 | /// #140 裏柳 431 | + (UIColor *)urayanagiColor; 432 | 433 | /// #141 岩井茶 434 | + (UIColor *)iwaichaColor; 435 | 436 | /// #142 萌黄 437 | + (UIColor *)moegiColor; 438 | 439 | /// #143 苗 440 | + (UIColor *)naeColor; 441 | 442 | /// #144 柳煤竹 443 | + (UIColor *)yanagisusutakeColor; 444 | 445 | /// #145 松葉 446 | + (UIColor *)matsubaColor; 447 | 448 | /// #146 青丹 449 | + (UIColor *)aoniColor; 450 | 451 | /// #147 薄青 452 | + (UIColor *)usuaoColor; 453 | 454 | /// #148 柳鼠 455 | + (UIColor *)yanaginezumiColor; 456 | 457 | /// #149 常磐 458 | + (UIColor *)tokiwaColor; 459 | 460 | /// #150 若竹 461 | + (UIColor *)wakatakeColor; 462 | 463 | /// #151 千歳緑 464 | + (UIColor *)chitosemidoriColor; 465 | 466 | /// #152 緑 467 | + (UIColor *)midoriColor; 468 | 469 | /// #153 白緑 470 | + (UIColor *)byakurokuColor; 471 | 472 | /// #154 老竹 473 | + (UIColor *)oitakeColor; 474 | 475 | /// #155 木賊 476 | + (UIColor *)tokusaColor; 477 | 478 | /// #156 御納戸茶 479 | + (UIColor *)onandochaColor; 480 | 481 | /// #157 緑青 482 | + (UIColor *)rokusyohColor; 483 | 484 | /// #158 錆青磁 485 | + (UIColor *)sabiseijiColor; 486 | 487 | /// #159 青竹 488 | + (UIColor *)aotakeColor; 489 | 490 | /// #160 ビロード 491 | + (UIColor *)veludoColor; 492 | 493 | /// #161 虫襖 494 | + (UIColor *)mushiaoColor; 495 | 496 | /// #162 藍海松茶 497 | + (UIColor *)aimiruchaColor; 498 | 499 | /// #163 沈香茶 500 | + (UIColor *)tonocha2Color; 501 | 502 | /// #164 青緑 503 | + (UIColor *)aomidoriColor; 504 | 505 | /// #165 青磁 506 | + (UIColor *)seijiColor; 507 | 508 | /// #166 鉄 509 | + (UIColor *)tetsuColor; 510 | 511 | /// #167 水浅葱 512 | + (UIColor *)mizuasagiColor; 513 | 514 | /// #168 青碧 515 | + (UIColor *)seihekiColor; 516 | 517 | /// #169 錆鉄御納戸 518 | + (UIColor *)sabitetsuonandoColor; 519 | 520 | /// #170 高麗納戸 521 | + (UIColor *)korainandoColor; 522 | 523 | /// #171 白群 524 | + (UIColor *)byakugunColor; 525 | 526 | /// #172 御召茶 527 | + (UIColor *)omeshichaColor; 528 | 529 | /// #173 瓶覗 530 | + (UIColor *)kamenozokiColor; 531 | 532 | /// #174 深川鼠 533 | + (UIColor *)fukagawanezumiColor; 534 | 535 | /// #175 錆浅葱 536 | + (UIColor *)sabiasagiColor; 537 | 538 | /// #176 水 539 | + (UIColor *)mizuColor; 540 | 541 | /// #177 浅葱 542 | + (UIColor *)asagiColor; 543 | 544 | /// #178 御納戸 545 | + (UIColor *)onandoColor; 546 | 547 | /// #179 藍 548 | + (UIColor *)aiColor; 549 | 550 | /// #180 新橋 551 | + (UIColor *)shinbashiColor; 552 | 553 | /// #181 錆御納戸 554 | + (UIColor *)sabionandoColor; 555 | 556 | /// #182 鉄御納戸 557 | + (UIColor *)tetsuonandoColor; 558 | 559 | /// #183 花浅葱 560 | + (UIColor *)hanaasagiColor; 561 | 562 | /// #184 藍鼠 563 | + (UIColor *)ainezumiColor; 564 | 565 | /// #185 舛花 566 | + (UIColor *)masuhanaColor; 567 | 568 | /// #186 空 569 | + (UIColor *)soraColor; 570 | 571 | /// #187 熨斗目花 572 | + (UIColor *)noshimehanaColor; 573 | 574 | /// #188 千草 575 | + (UIColor *)chigusaColor; 576 | 577 | /// #189 御召御納戸 578 | + (UIColor *)omeshionandoColor; 579 | 580 | /// #190 縹 581 | + (UIColor *)hanadaColor; 582 | 583 | /// #191 勿忘草 584 | + (UIColor *)wasurenagusaColor; 585 | 586 | /// #192 群青 587 | + (UIColor *)gunjyoColor; 588 | 589 | /// #193 露草 590 | + (UIColor *)tsuyukusaColor; 591 | 592 | /// #194 黒橡 593 | + (UIColor *)kurotsurubamiColor; 594 | 595 | /// #195 紺 596 | + (UIColor *)konColor; 597 | 598 | /// #196 褐 599 | + (UIColor *)kachiColor; 600 | 601 | /// #197 瑠璃 602 | + (UIColor *)ruriColor; 603 | 604 | /// #198 瑠璃紺 605 | + (UIColor *)rurikonColor; 606 | 607 | /// #199 紅碧 608 | + (UIColor *)benimidoriColor; 609 | 610 | /// #200 藤鼠 611 | + (UIColor *)fujinezumiColor; 612 | 613 | /// #201 鉄紺 614 | + (UIColor *)tetsukonColor; 615 | 616 | /// #202 紺青 617 | + (UIColor *)konjyoColor; 618 | 619 | /// #203 紅掛花 620 | + (UIColor *)benikakehanaColor; 621 | 622 | /// #204 紺桔梗 623 | + (UIColor *)konkikyoColor; 624 | 625 | /// #205 藤 626 | + (UIColor *)fujiColor; 627 | 628 | /// #206 二藍 629 | + (UIColor *)futaaiColor; 630 | 631 | /// #207 楝 632 | + (UIColor *)ouchiColor; 633 | 634 | /// #208 藤紫 635 | + (UIColor *)fujimurasakiColor; 636 | 637 | /// #209 桔梗 638 | + (UIColor *)kikyoColor; 639 | 640 | /// #210 紫苑 641 | + (UIColor *)shionColor; 642 | 643 | /// #211 滅紫 644 | + (UIColor *)messhiColor; 645 | 646 | /// #212 薄 647 | + (UIColor *)usuColor; 648 | 649 | /// #213 半 650 | + (UIColor *)hashitaColor; 651 | 652 | /// #214 江戸紫 653 | + (UIColor *)edomurasakiColor; 654 | 655 | /// #215 紫紺 656 | + (UIColor *)shikonColor; 657 | 658 | /// #216 深紫 659 | + (UIColor *)kokimurasakiColor; 660 | 661 | /// #217 菫 662 | + (UIColor *)sumireColor; 663 | 664 | /// #218 紫 665 | + (UIColor *)murasakiColor; 666 | 667 | /// #219 菖蒲 668 | + (UIColor *)ayameColor; 669 | 670 | /// #220 藤煤竹 671 | + (UIColor *)fujisusutakeColor; 672 | 673 | /// #221 紅藤 674 | + (UIColor *)benifujiColor; 675 | 676 | /// #222 黒紅 677 | + (UIColor *)kurobeniColor; 678 | 679 | /// #223 茄子紺 680 | + (UIColor *)nasukonColor; 681 | 682 | /// #224 葡萄鼠 683 | + (UIColor *)budohnezumiColor; 684 | 685 | /// #225 鳩羽鼠 686 | + (UIColor *)hatobanezumiColor; 687 | 688 | /// #226 杜若 689 | + (UIColor *)kakitsubataColor; 690 | 691 | /// #227 蒲葡 692 | + (UIColor *)ebizomeColor; 693 | 694 | /// #228 牡丹 695 | + (UIColor *)botanColor; 696 | 697 | /// #229 梅紫 698 | + (UIColor *)umemurasakiColor; 699 | 700 | /// #230 似紫 701 | + (UIColor *)nisemurasakiColor; 702 | 703 | /// #231 躑躅 704 | + (UIColor *)tsutsujiColor; 705 | 706 | /// #232 紫鳶 707 | + (UIColor *)murasakitobiColor; 708 | 709 | /// #233 白練 710 | + (UIColor *)shironeriColor; 711 | 712 | /// #234 胡粉 713 | + (UIColor *)gofunColor; 714 | 715 | /// #235 白鼠 716 | + (UIColor *)shironezumiColor; 717 | 718 | /// #236 銀鼠 719 | + (UIColor *)ginnezumiColor; 720 | 721 | /// #237 鉛 722 | + (UIColor *)namariColor; 723 | 724 | /// #238 灰 725 | + (UIColor *)haiColor; 726 | 727 | /// #239 素鼠 728 | + (UIColor *)sunezumiColor; 729 | 730 | /// #240 利休鼠 731 | + (UIColor *)rikyunezumiColor; 732 | 733 | /// #241 鈍 734 | + (UIColor *)nibiColor; 735 | 736 | /// #242 青鈍 737 | + (UIColor *)aonibiColor; 738 | 739 | /// #243 溝鼠 740 | + (UIColor *)dobunezumiColor; 741 | 742 | /// #244 紅消鼠 743 | + (UIColor *)benikeshinezumiColor; 744 | 745 | /// #245 藍墨茶 746 | + (UIColor *)aisumichaColor; 747 | 748 | /// #246 檳榔子染 749 | + (UIColor *)binrojizomeColor; 750 | 751 | /// #247 消炭 752 | + (UIColor *)keshizumiColor; 753 | 754 | /// #248 墨 755 | + (UIColor *)sumiColor; 756 | 757 | /// #249 黒 758 | + (UIColor *)kuroColor; 759 | 760 | /// #250 呂 761 | + (UIColor *)roColor; 762 | 763 | @end 764 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIDevice+Device.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+Device.h 3 | // 4 | // Created by Darktt on 13/7/4. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIDevice (Device) 12 | 13 | // Check device model with boolean value 14 | @property (readonly, getter = isIPadDevice) BOOL iPadDevice; 15 | @property (readonly, getter = isIPhoneDevice) BOOL iPhoneDevice; 16 | 17 | // Detect iPhone models. 18 | @property (readonly) BOOL is3_5InchScreenDevice; 19 | @property (readonly) BOOL is4InchScreenDevice; 20 | @property (readonly) BOOL is4_7InchScreenDevice; 21 | @property (readonly) BOOL is5_5InchScreenDevice; 22 | 23 | // Detect iPad models. 24 | @property (readonly) BOOL is12InchScreenDevice; 25 | 26 | // Check device jail breaked 27 | @property (readonly, getter = isJailBreaked) BOOL jailBreaked; 28 | 29 | // Check device model with string value 30 | - (NSString *)deviceModel; 31 | 32 | // Check device current use language 33 | - (NSString *)currentLanguage; 34 | 35 | @end 36 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIDevice+Version.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+Version.h 3 | // 4 | // Created by Darktt on 13/4/23. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIDevice (Version) 12 | 13 | - (BOOL)systemVersionIsEqualVersion:(NSString *)version; 14 | - (BOOL)systemVersionIsGreaterThanVersion:(NSString *)version; 15 | - (BOOL)systemVersionIsLessThanVersion:(NSString *)version; 16 | 17 | - (BOOL)systemVersionIsGreateThanOrEqualVersion:(NSString *)version; 18 | - (BOOL)systemVersionIsLessThanOrEqualVersion:(NSString *)version; 19 | 20 | @end 21 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIGestureRecognizer+GestureRecognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+GestureRecognizer.h 3 | // DTTest 4 | // 5 | // Created by Darktt on 14/12/29. 6 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface UIGestureRecognizer (GestureRecognizer) 13 | 14 | + (instancetype)gestureRecognizerWithTarget:(nullable id)target action:(nullable SEL)action; 15 | 16 | - (void)cancel; 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIImage+ColorPicker.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ColorPicker.h 3 | // 4 | // Created by Darktt on 15/3/19. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIImage (ColorPicker) 12 | 13 | - (UIColor *)pickColorWithPoint:(CGPoint)point; 14 | - (CGPoint)convertPoint:(CGPoint)viewPoint fromImageView:(UIImageView *)imageView; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIImage+DrawImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+DrawImage.h 3 | // 4 | // Created by Darktt on 13/6/3. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIImage (DrawImage) 12 | 13 | + (instancetype)imageWithColor:(UIColor *)color size:(CGSize)size; 14 | + (instancetype)imageWithString:(NSString *)string attributes:(NSDictionary *)attributes; 15 | + (instancetype)imageWithString:(NSString *)string attributes:(NSDictionary *)attributes offset:(CGPoint)offset; 16 | 17 | // Draw Gradient Image 18 | + (instancetype)gradientImageWithRect:(CGRect)rect beginColor:(UIColor *)beginColor endColor:(UIColor *)endColor location:(const CGFloat *)location; 19 | + (instancetype)gradientImageWithRect:(CGRect)rect gradientColors:(NSArray/**/ *)gradientColors location:(const CGFloat *)location; 20 | 21 | // Custom Gradient Image 22 | + (instancetype)bicycleMapsNavigationImage; 23 | + (instancetype)redGradientImageWithRect:(CGRect)rect; 24 | + (instancetype)grayGradientImageWithRect:(CGRect)rect; 25 | + (instancetype)blueGradientImageWithRect:(CGRect)rect; 26 | + (instancetype)greenGradientImageWithRect:(CGRect)rect; 27 | + (instancetype)purpleGradientImageWithRect:(CGRect)rect; 28 | + (instancetype)lightYellowGradientImageWithRect:(CGRect)rect; 29 | 30 | // Draw Rounded Rect Gradient Image 31 | + (instancetype)rounedRectImageWithSize:(CGSize)size cornerRadius:(CGFloat)cornerRadius gradientColors:(NSArray/**/ *)gradientColors lineColor:(nullable UIColor *)lineColor gradientLocation:(const CGFloat *)location; 32 | + (instancetype)rounedRectImageWithRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius gradientColors:(NSArray/**/ *)gradientColors lineColor:(nullable UIColor *)lineColor gradientLocation:(const CGFloat *)location; 33 | 34 | // Draw Rounded Rect Image 35 | + (instancetype)rounedRectImageWithSize:(CGSize)size cornerRadius:(CGFloat)cornerRadius color:(UIColor *)color; 36 | + (instancetype)rounedRectImageWithRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius color:(UIColor *)color; 37 | 38 | + (instancetype)rounedRectImageWithSize:(CGSize)size cornerRadius:(CGFloat)cornerRadius tintColor:(UIColor *)tintColor lineWidth:(CGFloat)lineWidth lineColor:(nullable UIColor *)lineColor; 39 | + (instancetype)rounedRectImageWithRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius tintColor:(UIColor *)tintColor lineWidth:(CGFloat)lineWidth lineColor:(nullable UIColor *)lineColor; 40 | 41 | @end 42 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIImage+Image.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Image.h 3 | // 4 | // Created by Darktt on 13/3/28. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | UIKIT_EXTERN BOOL UIImageOrientationIsPortrait(UIImageOrientation orientation); 12 | UIKIT_EXTERN BOOL UIImageOrientationIsLandscape(UIImageOrientation orientation); 13 | 14 | @interface UIImage (Image) 15 | 16 | @property (readonly) BOOL hasAlpha; 17 | 18 | + (UIImage *)screenImageWithRect:(CGRect)rect view:(UIView *)view; 19 | 20 | + (UIImage * _Nullable)imageFromView:(UIView *)view NS_SWIFT_NAME(imageFromView(_:)); 21 | 22 | + (UIImage *)launchImageWithOrientation:(UIDeviceOrientation)orientation; 23 | 24 | + (UIImage *)imageNamed:(NSString *)name inBundleName:(NSString *)bundleName NS_SWIFT_NAME(imageNamed(_:inBundleName:)); 25 | 26 | - (UIImage *)imageWithTransform:(CGAffineTransform)transform; 27 | 28 | - (UIImage *)imageWithBackgroundColor:(UIColor *)backgroundColor; 29 | 30 | @end 31 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIImage+Resize.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Resize.h 3 | // 4 | // Created by Darktt on 13/3/28. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | @import CoreGraphics; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface UIImage(Resize) 13 | 14 | - (UIImage *)croppedImage:(CGRect)bounds; 15 | 16 | - (UIImage *)thumbnailImage:(NSInteger)thumbnailSize interpolationQuality:(CGInterpolationQuality)quality; 17 | 18 | - (UIImage *)resizedImage:(CGSize)newSize interpolationQuality:(CGInterpolationQuality)quality; 19 | 20 | - (UIImage *)resizeImage:(UIImage *)image interpolationQuality:(CGInterpolationQuality)quality rate:(CGFloat)rate; 21 | 22 | - (UIImage *)resizedImageWithContentMode:(UIViewContentMode)contentMode bounds:(CGSize)bounds interpolationQuality:(CGInterpolationQuality)quality; 23 | 24 | - (UIImage *)scaleImageToSize:(CGSize)scaleSize; 25 | 26 | - (NSArray *)croppedImagesWithRect:(CGRect)croppedRect; 27 | 28 | @end 29 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIImage+ResizeImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+resizeImage.h 3 | // 4 | // Created by Darktt on 13/4/3. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIImage (ResizeImage) 12 | 13 | + (UIImage *)resizeImageWithSourceImageName:(NSString *)sourceName forMaxSize:(CGFloat)maxSize; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIImageView+ImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+ImageView.h 3 | // 4 | // Created by Darktt on 13/4/23. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | typedef void(^UIImageViewDownloadImageCompleteHandler) (UIImageView *imageView, NSError * _Nullable error); 12 | 13 | @interface UIImageView (ImageView) 14 | 15 | + (instancetype)imageViewWithFrame:(CGRect)frame; 16 | + (instancetype)imageViewWithImage:(UIImage *)image; 17 | 18 | + (instancetype)imageViewWithScreenShotFrame:(CGRect)frame; 19 | 20 | // Get imageView in superview 21 | + (__kindof UIImageView * _Nullable)imageViewInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(imageView(inView:tag:)); 22 | 23 | - (void)setImageWithURL:(NSURL *)URL completionHandler:(UIImageViewDownloadImageCompleteHandler _Nullable)completionHandler; 24 | 25 | - (void)setImage:(UIImage *)image animated:(BOOL)animated; 26 | - (void)setImage:(UIImage *)image maskImage:(UIImage *)maskImage; 27 | 28 | @end 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UILabel+Label.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+Label.h 3 | // 4 | // Created by Darktt on 13/4/23. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UILabel (Label) 12 | 13 | + (instancetype)labelWithFrame:(CGRect)frame; 14 | 15 | + (instancetype)labelWithFrame:(CGRect)frame textSize:(CGFloat)textSize; 16 | 17 | + (instancetype)labelWithFrame:(CGRect)frame text:(NSString * _Nullable)text; 18 | 19 | + (instancetype)labelWithFrame:(CGRect)frame text:(NSString *)text textSize:(CGFloat)textSize; 20 | 21 | + (instancetype)labelWithText:(NSString * _Nullable)text; 22 | 23 | + (instancetype)labelWithText:(NSString *)text textSize:(CGFloat)textSize; 24 | 25 | + (instancetype)labelWithAttributedText:(NSAttributedString * _Nullable)attributedText; 26 | 27 | // Get label in superview 28 | + (__kindof UILabel * _Nullable)labelInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(label(inView:tag:)); 29 | 30 | @end 31 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIMotionEffect+MotionEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIMotionEffect+MotionEffect.h 3 | // 4 | // Created by Darktt on 15/1/7. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIMotionEffect (MotionEffect) 12 | 13 | + (instancetype)motionEffectWithKeyPath:(NSString *)keyPath relativeValue:(CGFloat)relativeValue; 14 | 15 | @end 16 | 17 | @interface UIMotionEffectGroup (MotionEffect) 18 | 19 | - (instancetype)initWithEffectWithKeyPath:(NSString *)keyPath relativeValue:(CGFloat)relativeValue; 20 | 21 | @end 22 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIMutableUserNotificationAction+UserNotificationAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIMutableUserNotificationAction+UserNotificationAction.h 3 | // 4 | // Created by Darktt on 15/11/12. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIMutableUserNotificationAction (UserNotificationAction) 12 | 13 | + (instancetype)userNotificationActionWithTitle:(NSString *)title; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIMutableUserNotificationCategory+UserNotificationCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIMutableUserNotificationCategory+UserNotificationCategory.h 3 | // 4 | // Created by Darktt on 15/11/12. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIMutableUserNotificationCategory (UserNotificationCategory) 12 | 13 | + (instancetype)userNotificationCategoryWithIdentifier:(NSString *)identifier; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UINavigationController+Navigation.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+Navigation.h 3 | // 4 | // Created by Darktt on 13/1/16. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UINavigationController (Navigation) 12 | 13 | + (instancetype)navigationWithRootViewController:(UIViewController *)rootViewController NS_SWIFT_UNAVAILABLE("Does not suport Swift version"); 14 | + (instancetype)navigationWithNavigationBarClass:(Class)navigationBarClass toolbarClass:(Class)toolbarClass NS_SWIFT_UNAVAILABLE("Does not suport Swift version"); 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIPageControl+PageControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIPageControl+PageControl.h 3 | // 4 | // Created by Darktt on 14/11/19. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIPageControl (PageControl) 12 | 13 | + (instancetype)pageControlWithFrame:(CGRect)frame; 14 | 15 | // Get pageControl in superview 16 | + (__kindof UIPageControl * _Nullable)pageControlInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(pageControl(inView:tag:)); 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIPickerView+PickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIPickerView+PickerView.h 3 | // 4 | // Created by Darktt on 16/3/28. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIPickerView (PickerView) 12 | 13 | + (instancetype)pickerViewWithFrame:(CGRect)frame; 14 | 15 | // Get pickerView in superview 16 | + (__kindof UIPickerView * _Nullable)pickerViewInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(pickerView(inView:tag:)); 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIRefreshControl+RefreshControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIRefreshControl+RefreshControl.h 3 | // 4 | // Created by Darktt on 16/3/24. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIRefreshControl (RefreshControl) 12 | 13 | + (instancetype)refreshControlAddToView:(__kindof UIScrollView *)view; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIScrollView+ScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView+ScrollView.h 3 | // 4 | // Created by Darktt on 13/5/4. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | typedef NS_OPTIONS(NSUInteger, UIScrollOrientation){ 11 | UIScrollOrientationVertical = 1 << 0, 12 | UIScrollOrientationHorizontal = 1 << 1, 13 | }; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | @interface UIScrollView (ScrollView) 17 | 18 | + (instancetype)scrollViewWithFrame:(CGRect)frame; 19 | + (instancetype)scrollViewPagingWithFrame:(CGRect)frame NS_SWIFT_NAME(scrollViewPagingWithFrame(_:)); 20 | 21 | - (void)addSubviews:(NSArray<__kindof UIView *> *)views scrollOrientation:(UIScrollOrientation)orientation; 22 | 23 | /** 24 | * Query current page index for paging mode. 25 | * 26 | * @param count Total pages count. 27 | * 28 | * @return Unsigns integer of page index. 29 | * 30 | * @note When return value is NSNotFound, needs ignore that value. 31 | */ 32 | - (NSUInteger)pageIndexForCount:(NSUInteger)count; 33 | 34 | // Get scrollView in superview 35 | + (__kindof UIScrollView * _Nullable)scrollViewInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(scrollView(inView:tag:)); 36 | 37 | @end 38 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UISearchBar+SearchBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISearchBar+SearchBar.h 3 | // 4 | // Created by Darktt on 13/9/2. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UISearchBar (SearchBar) 12 | 13 | + (instancetype)searchBarWithFrame:(CGRect)frame; 14 | 15 | // Get searchBar in superview 16 | + (__kindof UISearchBar * _Nullable)searchBarInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(searchBar(inView:tag:)); 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UISegmentedControl+SegmentedControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISegmentedControl+SegmentedControl.h 3 | // 4 | // Created by Darktt on 16/3/12. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UISegmentedControl (SegmentedControl) 12 | 13 | + (instancetype)segmentedControlWithItems:(nullable NSArray *)items; 14 | 15 | - (void)setTitles:(NSArray *)titles; 16 | - (void)setImages:(NSArray *)images; 17 | 18 | + (__kindof UISegmentedControl * _Nullable)segmentedControlInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(segmentedControl(inView:tag:)); 19 | 20 | @end 21 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UISplitViewController+SplitView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISplitViewController+SplitView.h 3 | // 4 | // Created by Darktt on 14/9/23. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UISplitViewController (SplitView) 12 | 13 | + (instancetype)splitWithViewControllers:(NSArray<__kindof UIViewController *> *)viewControllers; 14 | 15 | @end 16 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UISwitch+Switch.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISwitch+Switch.h 3 | // 4 | // Created by Darktt on 14/12/22. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UISwitch (Switch) 12 | 13 | + (instancetype)switchWithTarget:(id)target action:(SEL)action; 14 | - (instancetype)initWithTarget:(id)target action:(SEL)action; 15 | 16 | // Get switch in super view. 17 | + (__kindof UISwitch * _Nullable)switchViewInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(switch(inView:tag:)); 18 | 19 | @end 20 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UITabBarController+TabBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITabBarController+TabBar.h 3 | // 4 | // Created by Darktt on 13/1/16. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UITabBarController (TabBar) 12 | 13 | + (instancetype)defauleTabBar; 14 | + (instancetype)tabBarWithViewControllers:(NSArray<__kindof UIViewController *> *)viewControllers; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UITableView+TableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+TableView.h 3 | // 4 | // Created by Darktt on 13/3/22. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UITableView (TableView) 12 | 13 | + (instancetype)tableViewWithFrame:(CGRect)frame style:(UITableViewStyle)tableViewStyle forTarget:(nullable id)target; 14 | 15 | - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)tableViewStyle forTarget:(nullable id)target; 16 | 17 | - (NSIndexPath * _Nullable)indexPathForRowAtView:(UIView *)view; 18 | 19 | - (void)reloadRow:(NSUInteger)row inSection:(NSUInteger)section withRowAnimation:(UITableViewRowAnimation)animation; 20 | - (void)reloadRowAtIndexPath:(NSIndexPath *)indexPath withRowAnimation:(UITableViewRowAnimation)animation; 21 | - (void)reloadSection:(NSUInteger)section withRowAnimation:(UITableViewRowAnimation)animation; 22 | 23 | - (void)insertRow:(NSUInteger)row inSection:(NSUInteger)section withRowAnimation:(UITableViewRowAnimation)animation; 24 | - (void)insertRowAtIndexPath:(NSIndexPath *)indexPath withRowAnimation:(UITableViewRowAnimation)animation; 25 | - (void)insertSection:(NSUInteger)section withRowAnimation:(UITableViewRowAnimation)animation; 26 | 27 | - (void)deleteRow:(NSUInteger)row inSection:(NSUInteger)section withRowAnimation:(UITableViewRowAnimation)animation; 28 | - (void)deleteRowAtIndexPath:(NSIndexPath *)indexPath withRowAnimation:(UITableViewRowAnimation)animation; 29 | - (void)deleteSection:(NSUInteger)section withRowAnimation:(UITableViewRowAnimation)animation; 30 | 31 | - (void)scrollToRow:(NSUInteger)row inSection:(NSUInteger)section atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated; 32 | 33 | // Get tableView in superview 34 | + (__kindof UITableView * _Nullable)tableViewInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(tableView(inView:tag:)); 35 | 36 | @end 37 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UITextField+TextField.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+TextField.h 3 | // 4 | // Created by Darktt on 14/2/5. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UITextField (TextField) 12 | 13 | + (instancetype)textFieldWithFrame:(CGRect)frame; 14 | + (instancetype)textFieldWithFrame:(CGRect)frame placeholder:(NSString * _Nullable)placeholder; 15 | 16 | // Get textField in superview 17 | + (__kindof UITextField * _Nullable)textFieldInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(textField(inView:tag:)); 18 | 19 | @end 20 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UITextView+TextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+TextView.h 3 | // 4 | // Created by Darktt on 13/6/2. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UITextView (TextView) 12 | 13 | + (instancetype)textViewWithFrame:(CGRect)frame; 14 | + (instancetype)textViewWithFrame:(CGRect)frame text:(NSString * _Nullable)text; 15 | + (instancetype)textViewWithFrame:(CGRect)frame backgroundColor:(UIColor * _Nullable)bgColor; 16 | 17 | // Get textView in superview 18 | + (__kindof UITextView * _Nullable)textViewInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(textView(inView:tag:)); 19 | 20 | @end 21 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIToolbar+Toolbar.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIToolbar+Toolbar.h 3 | // 4 | // Created by Darktt on 13/9/9. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIToolbar (Toolbar) 12 | 13 | + (instancetype)toolbarWithFrame:(CGRect)frame; 14 | 15 | // Get toolbar in superview 16 | + (__kindof UIToolbar * _Nullable)toolbarInView:(UIView *)superview withTag:(NSInteger)tag NS_SWIFT_NAME(toolbar(inView:tag:)); 17 | 18 | // Get UIBarButtonItem from current items 19 | - (__kindof UIBarButtonItem *)itemAtIndex:(NSUInteger)index; 20 | 21 | @end 22 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIView+View.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+View.h 3 | // 4 | // Created by Darktt on 13/4/15. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | typedef void (^UIViewAnimationsBlock) (void); 13 | typedef void (^UIViewCompletionBlock) (BOOL finshed); 14 | 15 | UIKIT_EXTERN UIViewAnimationOptions UIViewAnimationOptionsFromCurve(UIViewAnimationCurve curve); 16 | 17 | @interface UIView (View) 18 | 19 | @property (nonatomic, assign) CGPoint origin; 20 | @property (nonatomic, assign) CGSize size; 21 | @property (nonatomic, assign) CGFloat x; 22 | @property (nonatomic, assign) CGFloat y; 23 | @property (nonatomic, assign) CGFloat width; 24 | @property (nonatomic, assign) CGFloat height; 25 | 26 | + (instancetype)viewWithFrame:(CGRect)frame; 27 | + (instancetype)viewWithFrame:(CGRect)frame backgroundColor:(UIColor * _Nullable)bgColor; 28 | 29 | - (void)addSubviews:(NSArray<__kindof UIView *> *)views; 30 | - (void)removeAllSubviews; 31 | 32 | - (__kindof UIView * _Nullable)findFirstResponder; 33 | 34 | @end 35 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIView+Wobble.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Wobble.h 3 | // 4 | // Created by Darktt on 15/10/13. 5 | // Copyright © 2015 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | @interface UIView (Wobble) 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | @property (readonly, getter=isWobbling) BOOL wobbling; 14 | 15 | - (void)startWobble; 16 | - (void)stopWobble; 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIViewController+ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ViewController.h 3 | // 4 | // Created by Darktt on 14/11/25. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIViewController (ViewController) 12 | 13 | + (instancetype)viewController; 14 | + (instancetype)viewControllerWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; 15 | 16 | - (__kindof UIBarButtonItem *)toolbarItemAtIndex:(NSInteger)index; 17 | 18 | @end 19 | 20 | @interface UIViewController (ErrorHandler) 21 | 22 | /** 23 | * Present error with UIAlertController, alert title will use localizeable "Error" string 24 | * and with a dismiss button(localizeable too). 25 | * 26 | * @param error The error object will present. 27 | */ 28 | - (void)presentErrorAlertWithError:(NSError *)error; 29 | 30 | /** 31 | * Present alert with UIAlertController, this alert used single button, 32 | * that button title will use localizeable "Dismiss" string. 33 | * 34 | * @param title The alert title to present. 35 | * @param message The alert message to present. 36 | */ 37 | - (void)presentAlertWithTitle:(nullable NSString *)title message:(NSString *)message; 38 | 39 | /** 40 | * Present alert with UIAlertController. 41 | * 42 | * @param title Custom title. 43 | * @param message Custom message. 44 | * @param cancelTitle Custom cancel title for button. 45 | */ 46 | - (void)presentAlertWithTitle:(nullable NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)cancelTitle; 47 | 48 | @end 49 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIVisualEffectView+VisualEffectView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIVisualEffectView+VisualEffectView.h 3 | // 4 | // Created by Darktt on 14/12/29. 5 | // Copyright © 2014 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIVisualEffectView (VisualEffectView) 12 | 13 | + (instancetype)visualEffectViewWithBlurEffectStyle:(UIBlurEffectStyle)style; 14 | + (instancetype)visualEffectViewWithEffect:(UIVisualEffect *)effect; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIWebView+WebView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+WebView.h 3 | // 4 | // Created by Darktt on 13/1/16. 5 | // Copyright © 2013 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIWebView (WebView) 12 | 13 | + (instancetype)webViewWithFrame:(CGRect)frame; 14 | + (instancetype)webViewWithFrame:(CGRect)frame URL:(NSURL *)url; 15 | + (instancetype)webViewWithFrame:(CGRect)frame URL:(NSURL *)url delegate:(id _Nullable)delegate; 16 | + (instancetype)webViewWithContentsOfFile:(NSString *)filePath; 17 | 18 | // Get webView in superview 19 | + (__kindof UIWebView * _Nullable)webViewInView:(UIView *)superview withTag:(NSUInteger)tag NS_SWIFT_NAME(webView(inView:tag:)); 20 | 21 | @end 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /DTCategories.framework/Versions/A/Headers/UIWindow+Window.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow+Window.h 3 | // 4 | // Created by Darktt on 16/5/17. 5 | // Copyright © 2016 Darktt Personal Company. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface UIWindow (Window) 12 | 13 | + (instancetype)windowWithFrame:(CGRect)frame; 14 | + (instancetype)windowWithRootViewController:(UIViewController * _Nullable)viewController; 15 | 16 | @end 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCategories.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /DTCollectionViewCellMover/DTCollectionViewCellMover.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTCollectionViewCellMover.h 3 | // 4 | // Created by Darktt on 2016/5/23. 5 | // Copyright © 2016年 Darktt. All rights reserved. 6 | // 7 | 8 | #import "UICollectionView+CellMover.h" 9 | 10 | @import UIKit; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | @protocol DTCollectionViewCellMoverDelegate; 14 | @interface DTCollectionViewCellMover : NSObject 15 | 16 | /** 17 | * The scale for cell when dragging. Default is 1.5. 18 | */ 19 | @property (assign) CGFloat cellScale; 20 | 21 | @property (readonly, nonnull) UICollectionView *collectionView; 22 | 23 | + (instancetype)cellMoverWithDelegate:(id)delegate; 24 | - (instancetype)initWithDelegate:(id)delegate; 25 | 26 | @end 27 | 28 | @protocol DTCollectionViewCellMoverDelegate 29 | 30 | @optional 31 | 32 | /** 33 | * Notify delegate will begin dragging. 34 | * 35 | * @param cellMover Instance of DTCollectionViewCellMover. 36 | */ 37 | - (void)cellMoverWillBeginDragging:(DTCollectionViewCellMover *)cellMover NS_SWIFT_NAME(cellMover(willBeginDragging:)); 38 | 39 | /** 40 | * Notify delegate will end dragging, before update item. 41 | * 42 | * @param cellMover Instance of DTCollectionViewCellMover. 43 | */ 44 | - (void)cellMoverWillEndDragging:(DTCollectionViewCellMover *)cellMover NS_SWIFT_NAME(cellMover(willEndDragging:)); 45 | 46 | /** 47 | * Notify delegate did end dragging, after update item. 48 | * 49 | * @param cellMover Instance of DTCollectionViewCellMover. 50 | */ 51 | - (void)cellMoverDidEndDragging:(DTCollectionViewCellMover *)cellMover NS_SWIFT_NAME(cellMover(didEndDragging:)); 52 | 53 | /** 54 | * Check this cell of index path should be dragging. 55 | * 56 | * @param cellMover Instance of DTCollectionViewCellMover. 57 | * @param indexPath IndexPath of will dragging cell. 58 | * 59 | * @return YES is cell should be dragging, otherwise NO. 60 | */ 61 | - (BOOL)cellMover:(DTCollectionViewCellMover *)cellMover shouldBeginDraggingAtIndexPath:(NSIndexPath *)indexPath; 62 | 63 | @required 64 | 65 | /** 66 | * Notfy delegate what index did item move to. 67 | * 68 | * @param cellMover Instance of DTCollectionViewCellMover. 69 | * @param index Item's current index. 70 | * @param toIndex Index of item will move to. 71 | */ 72 | - (void)cellMover:(DTCollectionViewCellMover *)cellMover willMoveItemFromIndex:(NSInteger)index toIndex:(NSInteger)toIndex; 73 | 74 | @end 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /DTCollectionViewCellMover/DTCollectionViewCellMover.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTCollectionViewCellMover.m 3 | // 4 | // Created by Darktt on 2016/5/23. 5 | // Copyright © 2016年 Darktt. All rights reserved. 6 | // 7 | 8 | #import "DTCollectionViewCellMover.h" 9 | 10 | #pragma mark - UICollectionViewCell 11 | 12 | @interface UICollectionViewCell (Private) 13 | 14 | @property (assign, readonly) UIView *snapshotView; 15 | 16 | @end 17 | 18 | @implementation UICollectionViewCell (Private) 19 | 20 | - (UIView *)snapshotView 21 | { 22 | return [self snapshotViewAfterScreenUpdates:NO]; 23 | } 24 | 25 | @end 26 | 27 | #pragma mark - DTCollectionViewCellMover 28 | 29 | @interface DTCollectionViewCellMover () 30 | { 31 | // Scrolling Up Down set 32 | CADisplayLink *_scrollTimer; /**< Will invalidate and release when scroll end. */ 33 | BOOL _scrollUp; 34 | 35 | // Exchange Items set 36 | UILongPressGestureRecognizer *_longPressGestureRecognizer; 37 | NSIndexPath *_startIndexPath; /**< Will release in finish gesture recognizer */ 38 | NSIndexPath *_previousIndexPath; /**< Will release in finish gesture recognizer */ 39 | UIView *_draggingView; /**< Will release in finish gesture recognizer */ 40 | } 41 | 42 | @property (assign) id delegate; 43 | 44 | @property (assign, nonatomic) UICollectionView *collectionView; 45 | @property (assign) CGRect topScrollRect; 46 | @property (assign) CGRect bottomScrollRect; 47 | 48 | @end 49 | 50 | @implementation DTCollectionViewCellMover 51 | 52 | + (instancetype)cellMoverWithDelegate:(id)delegate 53 | { 54 | DTCollectionViewCellMover *cellMover = [[DTCollectionViewCellMover alloc] initWithDelegate:delegate]; 55 | 56 | return [cellMover autorelease]; 57 | } 58 | 59 | - (instancetype)initWithDelegate:(id)delegate 60 | { 61 | self = [super init]; 62 | if (self == nil) return nil; 63 | 64 | [self setDelegate:delegate]; 65 | [self setCellScale:1.5f]; 66 | 67 | return self; 68 | } 69 | 70 | - (void)dealloc 71 | { 72 | [self.collectionView removeGestureRecognizer:_longPressGestureRecognizer]; 73 | 74 | [super dealloc]; 75 | } 76 | 77 | #pragma mark - Override Property 78 | 79 | - (void)setCollectionView:(UICollectionView *)collectionView 80 | { 81 | _collectionView = collectionView; 82 | 83 | // Setup pan gesture to collectionView; 84 | if (collectionView != nil) { 85 | 86 | UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)]; 87 | [longPressGesture setMinimumPressDuration:0.5f]; 88 | 89 | [collectionView addGestureRecognizer:longPressGesture]; 90 | 91 | _longPressGestureRecognizer = longPressGesture; 92 | [longPressGesture release]; 93 | } 94 | } 95 | 96 | #pragma mark - Action 97 | 98 | - (void)handleGesture:(UILongPressGestureRecognizer *)sender 99 | { 100 | CGPoint point = [sender locationInView:self.collectionView]; 101 | 102 | UIGestureRecognizerState state = sender.state; 103 | UICollectionView *collectionView = self.collectionView; 104 | 105 | // Begin State 106 | if (state == UIGestureRecognizerStateBegan) { 107 | _startIndexPath = [[collectionView indexPathForItemAtPoint:point] retain]; 108 | _previousIndexPath = [[collectionView indexPathForItemAtPoint:point] retain]; 109 | 110 | // Copy a cell snapshot to dragging view. 111 | UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:_startIndexPath]; 112 | 113 | // When cell is nil cancel dragging. 114 | if (cell == nil) { 115 | 116 | [self cleanUP]; 117 | return; 118 | } 119 | 120 | BOOL shouldDragging = YES; 121 | 122 | if ([self.delegate respondsToSelector:@selector(cellMover:shouldBeginDraggingAtIndexPath:)]) { 123 | shouldDragging = [self.delegate cellMover:self shouldBeginDraggingAtIndexPath:_startIndexPath]; 124 | } 125 | 126 | // When should not dragging, cancel dragging. 127 | if (!shouldDragging) { 128 | 129 | [self cleanUP]; 130 | return; 131 | } 132 | 133 | // Notify delegate will begin dragging. 134 | if ([self.delegate respondsToSelector:@selector(cellMoverWillBeginDragging:)]) { 135 | [self.delegate cellMoverWillBeginDragging:self]; 136 | } 137 | 138 | [cell setHidden:YES]; 139 | 140 | CGAffineTransform transform = CGAffineTransformMakeScale(self.cellScale, self.cellScale); 141 | 142 | _draggingView = cell.snapshotView; 143 | [_draggingView setCenter:point]; 144 | [_draggingView setTransform:transform]; 145 | 146 | [collectionView addSubview:_draggingView]; 147 | [collectionView bringSubviewToFront:_draggingView]; 148 | } 149 | 150 | // End State 151 | if (state == UIGestureRecognizerStateEnded) { 152 | // Assign a point not in scoll range to stop scroll. 153 | [self scrollWithPoint:CGPointMake(-10.0f, -10.0f)]; 154 | 155 | UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:_previousIndexPath]; 156 | [cell setHidden:NO]; 157 | 158 | NSUInteger startIndex = _startIndexPath.item; 159 | NSUInteger toIndex = _previousIndexPath.item; 160 | 161 | // Notify delegate will end dragging. 162 | if ([self.delegate respondsToSelector:@selector(cellMoverWillEndDragging:)]) { 163 | [self.delegate cellMoverWillEndDragging:self]; 164 | } 165 | 166 | // Notify delegate item will move to new index. 167 | if ([self.delegate respondsToSelector:@selector(cellMover:willMoveItemFromIndex:toIndex:)]) { 168 | [self.delegate cellMover:self willMoveItemFromIndex:startIndex toIndex:toIndex]; 169 | } 170 | 171 | // Notify delegate did end dragging. 172 | if ([self.delegate respondsToSelector:@selector(cellMoverDidEndDragging:)]) { 173 | [self.delegate cellMoverDidEndDragging:self]; 174 | } 175 | 176 | // Clean up 177 | [self cleanUP]; 178 | 179 | [_draggingView removeFromSuperview]; 180 | _draggingView = nil; 181 | } 182 | 183 | // Other States (Not change state) 184 | if (state != UIGestureRecognizerStateChanged) { 185 | return; 186 | } 187 | 188 | // Change State 189 | [self scrollWithPoint:point]; 190 | 191 | NSIndexPath *throughIndexPath = [_collectionView indexPathForItemAtPoint:point]; 192 | 193 | if (throughIndexPath == nil) { 194 | throughIndexPath = _previousIndexPath; 195 | } 196 | 197 | void (^moveBatch) (void) = ^{ 198 | [_collectionView moveItemAtIndexPath:_previousIndexPath toIndexPath:throughIndexPath]; 199 | }; 200 | 201 | [_collectionView performBatchUpdates:moveBatch completion:nil]; 202 | 203 | NSComparisonResult comareResult = [_previousIndexPath compare:throughIndexPath]; 204 | if (comareResult != NSOrderedSame) { 205 | [_previousIndexPath release]; 206 | _previousIndexPath = [throughIndexPath retain]; 207 | } 208 | 209 | [_draggingView setCenter:point]; 210 | } 211 | 212 | #pragma mark - Private Methods 213 | 214 | - (void)cleanUP 215 | { 216 | [_startIndexPath release]; 217 | _startIndexPath = nil; 218 | 219 | [_previousIndexPath release]; 220 | _previousIndexPath = nil; 221 | } 222 | 223 | #pragma mark Scroll Up Down When Dragging 224 | 225 | - (void)scrollWithPoint:(CGPoint)point 226 | { 227 | UICollectionView *collectionView = self.collectionView; 228 | UIEdgeInsets contentInset = collectionView.contentInset; 229 | 230 | CGPoint convertPoint = [collectionView convertPoint:point toView:collectionView]; 231 | 232 | BOOL scrollUp = CGRectContainsPoint(self.bottomScrollRect, convertPoint); 233 | BOOL scrollDown = CGRectContainsPoint(self.topScrollRect, convertPoint); 234 | 235 | CGPoint contentOffset = collectionView.contentOffset; 236 | CGFloat heightOfCollectionView = CGRectGetHeight(collectionView.bounds); 237 | CGFloat heightOfContentView = collectionView.contentSize.height; 238 | CGFloat minimumOffsetY = 0.0f - contentInset.top; 239 | CGFloat maximumOffsetY = heightOfContentView - heightOfCollectionView + contentInset.bottom; 240 | 241 | if (scrollUp && contentOffset.y < maximumOffsetY) { 242 | _scrollUp = YES; 243 | 244 | if (_scrollTimer == nil) { 245 | NSRunLoop *runLoop = [NSRunLoop mainRunLoop]; 246 | 247 | CADisplayLink *scrollTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(scrollUpDown:)]; 248 | [scrollTimer addToRunLoop:runLoop forMode:NSDefaultRunLoopMode]; 249 | 250 | _scrollTimer = [scrollTimer retain]; 251 | } 252 | 253 | return; 254 | } 255 | 256 | if (scrollDown && contentOffset.y > minimumOffsetY) { 257 | _scrollUp = NO; 258 | 259 | if (_scrollTimer == nil) { 260 | NSRunLoop *runLoop = [NSRunLoop mainRunLoop]; 261 | 262 | CADisplayLink *scrollTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(scrollUpDown:)]; 263 | [scrollTimer addToRunLoop:runLoop forMode:NSDefaultRunLoopMode]; 264 | 265 | _scrollTimer = [scrollTimer retain]; 266 | } 267 | 268 | return; 269 | } 270 | 271 | _scrollUp = NO; 272 | 273 | if (_scrollTimer != nil) { 274 | [_scrollTimer invalidate]; 275 | [_scrollTimer release]; 276 | _scrollTimer = nil; 277 | } 278 | } 279 | 280 | - (void)scrollUpDown:(CADisplayLink *)sender 281 | { 282 | UICollectionView *collectionView = self.collectionView; 283 | UIEdgeInsets contentInset = collectionView.contentInset; 284 | 285 | CGFloat offsetY = (_scrollUp) ? 2.0f : -2.0f; 286 | 287 | CGFloat heightOfCollectionView = CGRectGetHeight(collectionView.bounds); 288 | CGFloat heightOfContentView = collectionView.contentSize.height; 289 | CGFloat minimumOffsetY = 0.0f - contentInset.top; 290 | CGFloat maximumOffsetY = heightOfContentView - heightOfCollectionView + contentInset.bottom; 291 | 292 | BOOL needAdjustPosistion = YES; 293 | 294 | CGPoint contentOffset = _collectionView.contentOffset; 295 | contentOffset.y += offsetY; 296 | 297 | if (contentOffset.y < minimumOffsetY) { 298 | contentOffset.y = minimumOffsetY; 299 | 300 | needAdjustPosistion = NO; 301 | } 302 | 303 | if (contentOffset.y > maximumOffsetY) { 304 | contentOffset.y = maximumOffsetY; 305 | 306 | needAdjustPosistion = NO; 307 | } 308 | 309 | [_collectionView setContentOffset:contentOffset]; 310 | 311 | if (needAdjustPosistion) { 312 | CGRect viewFrame = _draggingView.frame; 313 | viewFrame.origin.y += offsetY; 314 | 315 | [_draggingView setFrame:viewFrame]; 316 | } 317 | } 318 | 319 | @end 320 | -------------------------------------------------------------------------------- /DTCollectionViewCellMover/UICollectionView+CellMover.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView+CellMover.h 3 | // 4 | // Created by Darktt on 2016/5/23. 5 | // Copyright © 2016年 Darktt. All rights reserved. 6 | // 7 | 8 | @import UIKit; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @class DTCollectionViewCellMover; 13 | @interface UICollectionView (CellMover) 14 | 15 | @property (retain, nonatomic, nullable) DTCollectionViewCellMover *cellMover; 16 | 17 | @end 18 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /DTCollectionViewCellMover/UICollectionView+CellMover.m: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView+CellMover.m 3 | // 4 | // Created by Darktt on 2016/5/23. 5 | // Copyright © 2016年 Darktt. All rights reserved. 6 | // 7 | 8 | #import "UICollectionView+CellMover.h" 9 | #import "DTCollectionViewCellMover.h" 10 | 11 | @import ObjectiveC.runtime; 12 | 13 | static void DT_SwizzleMethod(Class class, SEL originalSelector, SEL swizzledSelector) 14 | { 15 | Method originalMethod = class_getInstanceMethod(class, originalSelector); 16 | Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); 17 | 18 | IMP swizzledImplemention = method_getImplementation(swizzledMethod); 19 | const char *swizzledTypeEncoding = method_getTypeEncoding(swizzledMethod); 20 | 21 | BOOL addMethod = class_addMethod(class, originalSelector, swizzledImplemention, swizzledTypeEncoding); 22 | 23 | if (addMethod) { 24 | IMP originalImplemention = method_getImplementation(originalMethod); 25 | const char *originalTypeEncoding = method_getTypeEncoding(originalMethod); 26 | 27 | class_replaceMethod(class, swizzledSelector, originalImplemention, originalTypeEncoding); 28 | } else { 29 | method_exchangeImplementations(originalMethod, swizzledMethod); 30 | } 31 | } 32 | 33 | #pragma mark - DTCollectionViewCellMover Category 34 | 35 | @interface DTCollectionViewCellMover (Private) 36 | 37 | @property (readwrite) UICollectionView *collectionView; 38 | @property (readwrite) CGRect topScrollRect; 39 | @property (readwrite) CGRect bottomScrollRect; 40 | 41 | @end 42 | 43 | #pragma mark - UICollectionView Category 44 | 45 | static NSString *const kCellMoverKey = @"Cell Mover"; 46 | 47 | @implementation UICollectionView (CellMover) 48 | 49 | + (void)load 50 | { 51 | [super load]; 52 | 53 | Class aClass = self; 54 | 55 | // Replace -layoutSubviews to -DT_layoutSubviews 56 | { 57 | SEL originalSelector = @selector(layoutSubviews); 58 | SEL replaceSelector = @selector(DT_layoutSubviews); 59 | 60 | DT_SwizzleMethod(aClass, originalSelector, replaceSelector); 61 | } 62 | 63 | // Replace -dealloc to -DT_dealloc 64 | { 65 | SEL originalSelector = @selector(dealloc); 66 | SEL replaceSelector = @selector(DT_dealloc); 67 | 68 | DT_SwizzleMethod(aClass, originalSelector, replaceSelector); 69 | } 70 | } 71 | 72 | - (void)DT_layoutSubviews 73 | { 74 | [self DT_layoutSubviews]; 75 | 76 | if (self.cellMover == nil) return; 77 | 78 | CGFloat heightOfEdge = CGRectGetHeight(self.bounds) - 100.0f; 79 | UIEdgeInsets topEdgeInsets = UIEdgeInsetsMake(0.0f, 0.0f, heightOfEdge, 0.0f); 80 | UIEdgeInsets bottomEdgeInsets = UIEdgeInsetsMake(heightOfEdge, 0.0f, 0.0f, 0.0f); 81 | 82 | CGRect topScrollRect = UIEdgeInsetsInsetRect(self.bounds, topEdgeInsets); 83 | CGRect bottomScrollRect = UIEdgeInsetsInsetRect(self.bounds, bottomEdgeInsets); 84 | 85 | [self.cellMover setTopScrollRect:topScrollRect]; 86 | [self.cellMover setBottomScrollRect:bottomScrollRect]; 87 | } 88 | 89 | - (void)DT_dealloc 90 | { 91 | objc_removeAssociatedObjects(self); 92 | 93 | [self DT_dealloc]; 94 | } 95 | 96 | #pragma mark - Override Methods 97 | 98 | - (void)setValue:(id)value forKey:(NSString *)key 99 | { 100 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 101 | } 102 | 103 | - (id)valueForKey:(NSString *)key 104 | { 105 | return objc_getAssociatedObject(self, key); 106 | } 107 | 108 | - (id)objectForKeyedSubscript:(NSString *)key 109 | { 110 | return [self valueForKey:key]; 111 | } 112 | 113 | #pragma mark - Override Property 114 | 115 | - (void)setCellMover:(DTCollectionViewCellMover *)cellMover 116 | { 117 | if (cellMover != nil) { 118 | [cellMover setCollectionView:self]; 119 | } 120 | 121 | [self setValue:cellMover forKey:kCellMoverKey]; 122 | } 123 | 124 | - (DTCollectionViewCellMover *)cellMover 125 | { 126 | return self[kCellMoverKey]; 127 | } 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CollectionViewCell Mover 2 | UICollectionView move cell module. 3 | 4 | --- 5 | [Try this demo](https://appetize.io/embed/9nvtwyceqrfjdxucx1cgamkdgg?device=iphone5s&scale=75&orientation=portrait&osVersion=9.3) 6 | --------------------------------------------------------------------------------