├── .swift-version ├── .gitignore ├── source ├── appLaunch.png ├── MKDiffuseMenu.gif ├── icon_MKAppKit.png ├── MKDropdownMailTF.gif ├── singleItemAnimation.gif └── MKCombineLoadingAnimation.gif ├── dev ├── Pods │ ├── Headers │ │ ├── Private │ │ │ └── MKAppKit │ │ │ │ ├── MKException.h │ │ │ │ ├── MKCrashGuardConst.h │ │ │ │ ├── MKCrashGuardManager.h │ │ │ │ ├── MKDropdownMailTF.h │ │ │ │ ├── NSArray+MKCrashGuard.h │ │ │ │ ├── NSCache+MKCrashGuard.h │ │ │ │ ├── NSNull+MKCrashGuard.h │ │ │ │ ├── NSSet+MKCrashGuard.h │ │ │ │ ├── NSTimer+MKCrashGuard.h │ │ │ │ ├── MKDropdownMailTFCell.h │ │ │ │ ├── NSNumber+MKCrashGuard.h │ │ │ │ ├── NSObject+MKCrashGuard.h │ │ │ │ ├── NSObject+MKSwizzleHook.h │ │ │ │ ├── NSString+MKCrashGuard.h │ │ │ │ ├── MKPushTableCell.h │ │ │ │ ├── NSDictionary+MKCrashGuard.h │ │ │ │ ├── NSMutableSet+MKCrashGuard.h │ │ │ │ ├── NSObject+MKKVCCrashGuard.h │ │ │ │ ├── NSObject+MKKVOCrashGuard.h │ │ │ │ ├── NSObject+MKSELCrashGuard.h │ │ │ │ ├── MKPushTableCellView.h │ │ │ │ ├── NSMutableArray+MKCrashGuard.h │ │ │ │ ├── NSUserDefaults+MKCrashGuard.h │ │ │ │ ├── MKDradualLoadingView.h │ │ │ │ ├── MKLoadingManagerView.h │ │ │ │ ├── NSMutableString+MKCrashGuard.h │ │ │ │ ├── NSAttributedString+MKCrashGuard.h │ │ │ │ ├── NSMutableDictionary+MKCrashGuard.h │ │ │ │ ├── MKControlLoadingCircleView.h │ │ │ │ ├── NSObject+MKNotificationCrashGuard.h │ │ │ │ ├── UINavigationController+MKCrashGuard.h │ │ │ │ ├── MKControlLoadingCircleLayer.h │ │ │ │ └── NSMutableAttributedString+MKCrashGuard.h │ │ └── Public │ │ │ └── MKAppKit │ │ │ ├── MKAppKit.modulemap │ │ │ ├── MKException.h │ │ │ ├── MKAppKit-umbrella.h │ │ │ ├── MKCrashGuardConst.h │ │ │ ├── MKDropdownMailTF.h │ │ │ ├── NSSet+MKCrashGuard.h │ │ │ ├── MKCrashGuardManager.h │ │ │ ├── NSArray+MKCrashGuard.h │ │ │ ├── NSCache+MKCrashGuard.h │ │ │ ├── NSNull+MKCrashGuard.h │ │ │ ├── NSTimer+MKCrashGuard.h │ │ │ ├── MKDropdownMailTFCell.h │ │ │ ├── NSNumber+MKCrashGuard.h │ │ │ ├── NSObject+MKCrashGuard.h │ │ │ ├── NSObject+MKSwizzleHook.h │ │ │ ├── NSString+MKCrashGuard.h │ │ │ ├── MKPushTableCell.h │ │ │ ├── NSDictionary+MKCrashGuard.h │ │ │ ├── NSMutableSet+MKCrashGuard.h │ │ │ ├── NSObject+MKKVCCrashGuard.h │ │ │ ├── NSObject+MKKVOCrashGuard.h │ │ │ ├── NSObject+MKSELCrashGuard.h │ │ │ ├── MKPushTableCellView.h │ │ │ ├── NSMutableArray+MKCrashGuard.h │ │ │ ├── NSMutableString+MKCrashGuard.h │ │ │ ├── NSUserDefaults+MKCrashGuard.h │ │ │ ├── MKDradualLoadingView.h │ │ │ ├── MKLoadingManagerView.h │ │ │ ├── NSAttributedString+MKCrashGuard.h │ │ │ ├── NSMutableDictionary+MKCrashGuard.h │ │ │ ├── NSObject+MKNotificationCrashGuard.h │ │ │ ├── MKControlLoadingCircleLayer.h │ │ │ ├── MKControlLoadingCircleView.h │ │ │ ├── UINavigationController+MKCrashGuard.h │ │ │ └── NSMutableAttributedString+MKCrashGuard.h │ ├── Target Support Files │ │ ├── MKAppKit │ │ │ ├── MKAppKit.modulemap │ │ │ ├── MKAppKit-dummy.m │ │ │ ├── MKAppKit-prefix.pch │ │ │ ├── MKAppKit.xcconfig │ │ │ └── MKAppKit-umbrella.h │ │ └── Pods-MKApp │ │ │ ├── Pods-MKApp.modulemap │ │ │ ├── Pods-MKApp-dummy.m │ │ │ ├── Pods-MKApp-resources-Debug-output-files.xcfilelist │ │ │ ├── Pods-MKApp-resources-Release-output-files.xcfilelist │ │ │ ├── Pods-MKApp-resources-Debug-input-files.xcfilelist │ │ │ ├── Pods-MKApp-resources-Release-input-files.xcfilelist │ │ │ ├── Pods-MKApp-umbrella.h │ │ │ ├── Pods-MKApp.debug.xcconfig │ │ │ ├── Pods-MKApp.release.xcconfig │ │ │ ├── Pods-MKApp-acknowledgements.markdown │ │ │ └── Pods-MKApp-acknowledgements.plist │ ├── MKAppKit │ │ ├── MKAppKit │ │ │ ├── Resource │ │ │ │ └── MKCLAResource.bundle │ │ │ │ │ ├── mkcla-imageHook.png │ │ │ │ │ ├── en.lproj │ │ │ │ │ └── Root.strings │ │ │ │ │ ├── mkcla-imageHook@2x.png │ │ │ │ │ ├── mkcla-imageHook@3x.png │ │ │ │ │ ├── mkcla-imageLoading.png │ │ │ │ │ ├── mkcla-imageLoading@2x.png │ │ │ │ │ ├── mkcla-imageLoading@3x.png │ │ │ │ │ └── Root.plist │ │ │ ├── MKCrash │ │ │ │ └── MKCrashGuard │ │ │ │ │ ├── MKCrashGuardConst.m │ │ │ │ │ ├── NSNull+MKCrashGuard.h │ │ │ │ │ ├── NSObject+MKSELCrashGuard.h │ │ │ │ │ ├── NSTimer+MKCrashGuard.h │ │ │ │ │ ├── UINavigationController+MKCrashGuard.h │ │ │ │ │ ├── NSSet+MKCrashGuard.h │ │ │ │ │ ├── NSObject+MKNotificationCrashGuard.h │ │ │ │ │ ├── NSObject+MKKVOCrashGuard.h │ │ │ │ │ ├── NSMutableSet+MKCrashGuard.h │ │ │ │ │ ├── NSMutableDictionary+MKCrashGuard.h │ │ │ │ │ ├── NSNull+MKCrashGuard.m │ │ │ │ │ ├── NSObject+MKKVCCrashGuard.h │ │ │ │ │ ├── NSSet+MKCrashGuard.m │ │ │ │ │ ├── NSObject+MKCrashGuard.h │ │ │ │ │ ├── NSDictionary+MKCrashGuard.h │ │ │ │ │ ├── MKCrashGuardConst.h │ │ │ │ │ ├── NSArray+MKCrashGuard.h │ │ │ │ │ ├── NSMutableString+MKCrashGuard.h │ │ │ │ │ ├── NSMutableArray+MKCrashGuard.h │ │ │ │ │ ├── NSMutableSet+MKCrashGuard.m │ │ │ │ │ ├── MKException.h │ │ │ │ │ ├── NSMutableAttributedString+MKCrashGuard.h │ │ │ │ │ ├── NSObject+MKSwizzleHook.h │ │ │ │ │ ├── NSAttributedString+MKCrashGuard.h │ │ │ │ │ ├── NSString+MKCrashGuard.h │ │ │ │ │ ├── NSMutableDictionary+MKCrashGuard.m │ │ │ │ │ └── NSObject+MKKVCCrashGuard.m │ │ │ ├── MKAnimation │ │ │ │ └── MKCombineLoadingAnimation │ │ │ │ │ ├── MKPushTableCell.h │ │ │ │ │ ├── MKPushTableCellView.h │ │ │ │ │ ├── MKDradualLoadingView.h │ │ │ │ │ ├── MKLoadingManagerView.h │ │ │ │ │ ├── MKControlLoadingCircleView.h │ │ │ │ │ ├── MKControlLoadingCircleLayer.h │ │ │ │ │ ├── MKPushTableCell.m │ │ │ │ │ └── MKPushTableCellView.m │ │ │ └── MKUIKit │ │ │ │ └── MKDropdownMailTF │ │ │ │ ├── MKDropdownMailTFCell.h │ │ │ │ ├── MKDropdownMailTFCell.m │ │ │ │ └── MKDropdownMailTF.h │ │ ├── LICENSE │ │ └── README.md │ ├── Pods.xcodeproj │ │ └── xcuserdata │ │ │ └── apple.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ ├── Manifest.lock │ └── Local Podspecs │ │ └── MKAppKit.podspec.json ├── MKApp │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── mkdiffusemenu │ │ │ ├── Contents.json │ │ │ ├── mkdm-icon-plus.imageset │ │ │ │ ├── mkdm-icon-plus.png │ │ │ │ ├── mkdm-icon-plus@2x.png │ │ │ │ └── Contents.json │ │ │ ├── mkdm-icon-star.imageset │ │ │ │ ├── mkdm-icon-star.png │ │ │ │ ├── mkdm-icon-star@2x.png │ │ │ │ └── Contents.json │ │ │ ├── mkdm-bg-menuitem.imageset │ │ │ │ ├── mkdm-bg-menuitem.png │ │ │ │ ├── mkdm-bg-menuitem@2x.png │ │ │ │ └── Contents.json │ │ │ ├── mkdm-bg-addbutton.imageset │ │ │ │ ├── mkdm-bg-addbutton.png │ │ │ │ ├── mkdm-bg-addbutton@2x.png │ │ │ │ └── Contents.json │ │ │ ├── mkdm-icon-plus-highlighted.imageset │ │ │ │ ├── mkdm-icon-plus-highlighted.png │ │ │ │ ├── mkdm-icon-plus-highlighted@2x.png │ │ │ │ └── Contents.json │ │ │ ├── mkdm-bg-menuitem-highlighted.imageset │ │ │ │ ├── mkdm-bg-menuitem-highlighted.png │ │ │ │ ├── mkdm-bg-menuitem-highlighted@2x.png │ │ │ │ └── Contents.json │ │ │ └── mkdm-bg-addbutton-highlighted.imageset │ │ │ │ ├── mkdiffusemenu-bg-addbutton-highlighted.png │ │ │ │ ├── mkdiffusemenu-bg-addbutton-highlighted@2x.png │ │ │ │ └── Contents.json │ │ ├── icon.imageset │ │ │ ├── icon.jpeg │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.h │ ├── AppDelegate.h │ ├── main.m │ ├── Test │ │ ├── UTest.h │ │ └── CrashTest.h │ ├── Info.plist │ └── Base.lproj │ │ └── LaunchScreen.storyboard ├── DemoVC │ ├── Animation │ │ ├── MKApp-Bridging-Header.h │ │ └── CombineLoadingAnimationVC.h │ └── UIKit │ │ ├── DropdownMailTFVC.h │ │ └── DropdownMailTFVC.m ├── MKApp.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── apple.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── MKApp.xcworkspace │ ├── xcuserdata │ │ └── apple.xcuserdatad │ │ │ ├── IDEFindNavigatorScopes.plist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── MKAppTests │ ├── Info.plist │ └── MKAppTests.m └── Podfile ├── MKAppKit ├── Resource │ └── MKCLAResource.bundle │ │ ├── mkcla-imageHook.png │ │ ├── en.lproj │ │ └── Root.strings │ │ ├── mkcla-imageHook@2x.png │ │ ├── mkcla-imageHook@3x.png │ │ ├── mkcla-imageLoading.png │ │ ├── mkcla-imageLoading@2x.png │ │ ├── mkcla-imageLoading@3x.png │ │ └── Root.plist ├── MKMonitor │ ├── MKMonitor │ │ ├── MKBaseVC.h │ │ ├── MKDebugVC.h │ │ ├── MKCrashVC.h │ │ ├── MKLogVC.h │ │ ├── MKDebug.h │ │ ├── MKContentVC.h │ │ ├── MKResponseVC.h │ │ ├── MKDebugVC.m │ │ ├── MKCrashHelper.h │ │ ├── MKBaseVC.m │ │ ├── MKDebugTool.h │ │ └── MKDebug.m │ ├── MKNetworkMonitor │ │ ├── MKHttpVC.h │ │ ├── MKHttpProtocol.h │ │ ├── MKHttpCell.h │ │ ├── MKUrlSessionHook.h │ │ ├── MKHttpDetailVC.h │ │ ├── MKURLCategory.h │ │ ├── MKHttpDatasource.h │ │ └── MKHttpCell.m │ ├── MKMemoryMonitor │ │ └── MKMemoryHelper.h │ ├── MKLaunchMonitor │ │ ├── NSObject+MKTTimeLoad.h │ │ ├── MKPointWatch.h │ │ └── NSObject+MKTTimeLoad.m │ ├── MKCrashMonitor │ │ ├── MKCrashMonitor.h │ │ ├── MKCrashCaught.h │ │ └── MKCrashMonitor.m │ └── MKWatchDog │ │ ├── MKMainThreadWatch.h │ │ ├── MKRunLoopWatch.h │ │ └── MKFPSWatch.h ├── MKCrash │ └── MKCrashGuard │ │ ├── MKCrashGuardConst.m │ │ ├── NSNull+MKCrashGuard.h │ │ ├── NSObject+MKSELCrashGuard.h │ │ ├── NSNumber+MKCrashGuard.h │ │ ├── NSTimer+MKCrashGuard.h │ │ ├── UINavigationController+MKCrashGuard.h │ │ ├── NSSet+MKCrashGuard.h │ │ ├── NSObject+MKNotificationCrashGuard.h │ │ ├── NSCache+MKCrashGuard.h │ │ ├── NSObject+MKKVOCrashGuard.h │ │ ├── NSMutableSet+MKCrashGuard.h │ │ ├── NSMutableDictionary+MKCrashGuard.h │ │ ├── NSNull+MKCrashGuard.m │ │ ├── NSUserDefaults+MKCrashGuard.h │ │ ├── NSObject+MKKVCCrashGuard.h │ │ ├── NSSet+MKCrashGuard.m │ │ ├── NSObject+MKCrashGuard.h │ │ ├── NSDictionary+MKCrashGuard.h │ │ ├── MKCrashGuardConst.h │ │ ├── NSArray+MKCrashGuard.h │ │ ├── NSMutableString+MKCrashGuard.h │ │ ├── NSMutableArray+MKCrashGuard.h │ │ ├── NSMutableSet+MKCrashGuard.m │ │ ├── MKException.h │ │ ├── NSMutableAttributedString+MKCrashGuard.h │ │ ├── NSObject+MKSwizzleHook.h │ │ ├── NSAttributedString+MKCrashGuard.h │ │ ├── NSString+MKCrashGuard.h │ │ ├── NSNumber+MKCrashGuard.m │ │ ├── NSCache+MKCrashGuard.m │ │ ├── NSMutableDictionary+MKCrashGuard.m │ │ └── NSObject+MKKVCCrashGuard.m ├── MKCategory │ ├── MKCategory.h │ ├── NSData+MKCategory.h │ ├── NSObject+MKGuard.h │ ├── NSTimer+MKCategory.h │ ├── NSFileManager+MKCategory.h │ ├── NSString+MKCategory.h │ ├── NSTimer+MKCategory.m │ ├── NSObject+MKGuard.m │ ├── NSString+MKCategory.m │ └── NSData+MKCategory.m ├── MKAnimation │ └── MKCombineLoadingAnimation │ │ ├── MKPushTableCell.h │ │ ├── MKPushTableCellView.h │ │ ├── MKDradualLoadingView.h │ │ ├── MKLoadingManagerView.h │ │ ├── MKControlLoadingCircleView.h │ │ ├── MKControlLoadingCircleLayer.h │ │ ├── MKPushTableCell.m │ │ └── MKPushTableCellView.m ├── MKTool │ ├── MKSandbox.h │ ├── MKThreadTrace.h │ ├── MKFileUtils.h │ └── MKDevice.h ├── MKFoundation │ ├── MKLockSentinel.m │ ├── MKLockSentinel.h │ └── MKJSON.h ├── MKUIKit │ └── MKDropdownMailTF │ │ ├── MKDropdownMailTFCell.h │ │ ├── MKDropdownMailTFCell.m │ │ └── MKDropdownMailTF.h ├── 0.0.3 │ └── MKAppKit.podspec └── 0.0.4 │ └── MKAppKit.podspec ├── .cocoadocs.yml ├── doc ├── MKDropdownMailTF.md ├── MKCombineLoadingAnimation.md └── MKMonitor.md ├── LICENSE ├── .travis.yml ├── README.md └── MKAppKit.podspec /.swift-version: -------------------------------------------------------------------------------- 1 | 5.0 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | Podfile.lock 4 | *.xcuserstate -------------------------------------------------------------------------------- /source/appLaunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/source/appLaunch.png -------------------------------------------------------------------------------- /source/MKDiffuseMenu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/source/MKDiffuseMenu.gif -------------------------------------------------------------------------------- /source/icon_MKAppKit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/source/icon_MKAppKit.png -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKException.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/MKException.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKAppKit.modulemap: -------------------------------------------------------------------------------- 1 | ../../../Target Support Files/MKAppKit/MKAppKit.modulemap -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKException.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/MKException.h -------------------------------------------------------------------------------- /source/MKDropdownMailTF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/source/MKDropdownMailTF.gif -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKAppKit-umbrella.h: -------------------------------------------------------------------------------- 1 | ../../../Target Support Files/MKAppKit/MKAppKit-umbrella.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKCrashGuardConst.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardConst.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKCrashGuardConst.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardConst.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKDropdownMailTF.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTF.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSSet+MKCrashGuard.h -------------------------------------------------------------------------------- /source/singleItemAnimation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/source/singleItemAnimation.gif -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKCrashGuardManager.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardManager.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKDropdownMailTF.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTF.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSArray+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSCache+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSCache+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSNull+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSNull+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSSet+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSTimer+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSTimer+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKCrashGuardManager.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardManager.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSArray+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSCache+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSCache+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSNull+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSNull+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSTimer+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSTimer+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKDropdownMailTFCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSNumber+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSNumber+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSObject+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSObject+MKSwizzleHook.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSwizzleHook.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKDropdownMailTFCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSNumber+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSNumber+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSObject+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSObject+MKSwizzleHook.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSwizzleHook.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSString+MKCrashGuard.h -------------------------------------------------------------------------------- /source/MKCombineLoadingAnimation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/source/MKCombineLoadingAnimation.gif -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKPushTableCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSDictionary+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSMutableSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableSet+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSObject+MKKVCCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVCCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSObject+MKKVOCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVOCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSObject+MKSELCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSELCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKPushTableCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSDictionary+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSMutableSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableSet+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSObject+MKKVCCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVCCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSObject+MKKVOCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVOCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSObject+MKSELCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSELCrashGuard.h -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKPushTableCellView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCellView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSMutableArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableArray+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSUserDefaults+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSUserDefaults+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKPushTableCellView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCellView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSMutableArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableArray+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSMutableString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSUserDefaults+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSUserDefaults+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKDradualLoadingView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKDradualLoadingView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKLoadingManagerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKLoadingManagerView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSMutableString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKDradualLoadingView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKDradualLoadingView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKLoadingManagerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKLoadingManagerView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSAttributedString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSMutableDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableDictionary+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSAttributedString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSMutableDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableDictionary+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSObject+MKNotificationCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKNotificationCrashGuard.h -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/icon.imageset/icon.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/icon.imageset/icon.jpeg -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKControlLoadingCircleView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSObject+MKNotificationCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSObject+MKNotificationCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/UINavigationController+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/UINavigationController+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKControlLoadingCircleLayer.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleLayer.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/MKControlLoadingCircleView.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleView.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/UINavigationController+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/UINavigationController+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/MKControlLoadingCircleLayer.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleLayer.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Public/MKAppKit/NSMutableAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableAttributedString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/Pods/Headers/Private/MKAppKit/NSMutableAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | ../../../../../MKAppKit/MKCrash/MKCrashGuard/NSMutableAttributedString+MKCrashGuard.h -------------------------------------------------------------------------------- /dev/DemoVC/Animation/MKApp-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook.png -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@2x.png -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@3x.png -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading.png -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/MKAppKit/MKAppKit.modulemap: -------------------------------------------------------------------------------- 1 | module MKAppKit { 2 | umbrella header "MKAppKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@2x.png -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@3x.png -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp.modulemap: -------------------------------------------------------------------------------- 1 | module Pods_MKApp { 2 | umbrella header "Pods-MKApp-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/MKAppKit/MKAppKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MKAppKit : NSObject 3 | @end 4 | @implementation PodsDummy_MKAppKit 5 | @end 6 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MKApp : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MKApp 5 | @end 6 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook.png -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@2x.png -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageHook@3x.png -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus.imageset/mkdm-icon-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus.imageset/mkdm-icon-plus.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-star.imageset/mkdm-icon-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-star.imageset/mkdm-icon-star.png -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@2x.png -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/mkcla-imageLoading@3x.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem.imageset/mkdm-bg-menuitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem.imageset/mkdm-bg-menuitem.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus.imageset/mkdm-icon-plus@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus.imageset/mkdm-icon-plus@2x.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-star.imageset/mkdm-icon-star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-star.imageset/mkdm-icon-star@2x.png -------------------------------------------------------------------------------- /.cocoadocs.yml: -------------------------------------------------------------------------------- 1 | highlight-color: "#F89915" 2 | highlight-dark-color: "#E23B1B" 3 | darker-color: "#D8A688" 4 | darker-dark-color: "#E93D1C" 5 | background-color: "#E9DFDB" 6 | alt-link-color: "#E23B1B" 7 | warning-color: "#E23B1B" 8 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton.imageset/mkdm-bg-addbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton.imageset/mkdm-bg-addbutton.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem.imageset/mkdm-bg-menuitem@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem.imageset/mkdm-bg-menuitem@2x.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton.imageset/mkdm-bg-addbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton.imageset/mkdm-bg-addbutton@2x.png -------------------------------------------------------------------------------- /dev/MKApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus-highlighted.imageset/mkdm-icon-plus-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus-highlighted.imageset/mkdm-icon-plus-highlighted.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus-highlighted.imageset/mkdm-icon-plus-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus-highlighted.imageset/mkdm-icon-plus-highlighted@2x.png -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem-highlighted.imageset/mkdm-bg-menuitem-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem-highlighted.imageset/mkdm-bg-menuitem-highlighted.png -------------------------------------------------------------------------------- /dev/MKApp.xcworkspace/xcuserdata/apple.xcuserdatad/IDEFindNavigatorScopes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem-highlighted.imageset/mkdm-bg-menuitem-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem-highlighted.imageset/mkdm-bg-menuitem-highlighted@2x.png -------------------------------------------------------------------------------- /dev/MKApp.xcworkspace/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton-highlighted.imageset/mkdiffusemenu-bg-addbutton-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton-highlighted.imageset/mkdiffusemenu-bg-addbutton-highlighted.png -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKBaseVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | @interface MKBaseVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKDebugVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | @interface MKDebugVC : UITabBarController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton-highlighted.imageset/mkdiffusemenu-bg-addbutton-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mythkiven/MKAppKit/HEAD/dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton-highlighted.imageset/mkdiffusemenu-bg-addbutton-highlighted@2x.png -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKCrashVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | #import "MKBaseVC.h" 10 | 11 | @interface MKCrashVC : MKBaseVC 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /dev/MKApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKHttpVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | #import "MKBaseVC.h" 11 | 12 | @interface MKHttpVC : MKBaseVC 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKHttpProtocol.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | 12 | @interface MKHttpProtocol : NSURLProtocol 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /dev/MKApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /dev/MKApp/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MKApp 4 | // 5 | // Created by https://github.com/mythkiven/ on 2019/4/28. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-resources-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MKCLAResource.bundle 2 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MKPushTableCell.nib 3 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MKDropdownMailTFCell.nib -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-resources-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MKCLAResource.bundle 2 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MKPushTableCell.nib 3 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MKDropdownMailTFCell.nib -------------------------------------------------------------------------------- /dev/DemoVC/UIKit/DropdownMailTFVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // DropdownMailTFVC.h 3 | // MKApp 4 | // 5 | // Created by https://github.com/mythkiven/ on 2019/4/28. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DropdownMailTFVC : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /dev/MKApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKLogVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "MKBaseVC.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | 13 | @interface MKLogVC : MKBaseVC 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardConst.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "MKCrashGuardConst.h" 9 | 10 | 11 | @implementation MKCrashGuardConst 12 | 13 | - (void)mkProxyMethod { 14 | 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKDebug.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/05/29. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | */ 8 | 9 | 10 | #import 11 | 12 | @interface MKDebug : NSObject 13 | 14 | + (void)debugRegister; 15 | + (void)enableDebug; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKContentVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | #import "MKBaseVC.h" 10 | 11 | @interface MKContentVC : MKBaseVC 12 | 13 | @property (nonatomic,copy)NSString *content; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /dev/DemoVC/Animation/CombineLoadingAnimationVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // CombineLoadingAnimationVC.h 3 | // MKApp 4 | // 5 | // Created by https://github.com/mythkiven/ on 15/01/14. 6 | // Copyright © 2015年 mythkiven. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface CombineLoadingAnimationVC : UIViewController 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKHttpCell.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | @interface MKHttpCell : UITableViewCell 12 | 13 | - (void)setTitle:(NSString*)title value:(NSString*)value; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardConst.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "MKCrashGuardConst.h" 9 | 10 | 11 | @implementation MKCrashGuardConst 12 | 13 | - (void)mkProxyMethod { 14 | 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKUrlSessionHook.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MKUrlSessionHook : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/MKCategory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #ifndef MKCategory_h 10 | #define MKCategory_h 11 | 12 | #import "NSTimer+MKCategory.h" 13 | #import "NSString+MKCategory.h" 14 | #import "NSFileManager+MKCategory.h" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-resources-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-MKApp/Pods-MKApp-resources.sh 2 | ${PODS_ROOT}/../../MKAppKit/Resource/MKCLAResource.bundle 3 | ${PODS_ROOT}/../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.xib 4 | ${PODS_ROOT}/../../MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.xib -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCell.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface MKPushTableCell : UITableViewCell 11 | @property (assign,nonatomic) NSInteger index; 12 | @end 13 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSData+MKCategory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | @interface NSData (MKCategory) 11 | 12 | /** 13 | @brief 返回有效的UTF8编码的NSData数据,替换掉无效的编码 14 | **/ 15 | - (NSData *)mk_UTF8Data; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-resources-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-MKApp/Pods-MKApp-resources.sh 2 | ${PODS_ROOT}/../../MKAppKit/Resource/MKCLAResource.bundle 3 | ${PODS_ROOT}/../../MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.xib 4 | ${PODS_ROOT}/../../MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.xib -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMemoryMonitor/MKMemoryHelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | @interface MKMemoryHelper : NSObject 12 | 13 | + (int64_t)memoryUsage; 14 | + (unsigned long long)bytesOfUsedMemory; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MKAppKit/MKTool/MKSandbox.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/07/01. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | */ 8 | 9 | #import 10 | 11 | @interface MKSandbox : NSObject 12 | 13 | + (instancetype)sharedInstance; 14 | 15 | - (void)enableSwipe; 16 | - (void)showSandboxBrowser; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /dev/MKApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MKApp 4 | // 5 | // Created by https://github.com/mythkiven/ on 2019/4/28. 6 | // Copyright © 2019 MythKiven. 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 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSNull+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSNull (MKCrashGuard) 13 | 14 | + (void)guardNSNull; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCell.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface MKPushTableCell : UITableViewCell 11 | @property (assign,nonatomic) NSInteger index; 12 | @end 13 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKResponseVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | #import "MKBaseVC.h" 10 | 11 | @interface MKResponseVC : MKBaseVC 12 | @property (nonatomic, strong) NSData *data; 13 | @property (nonatomic, assign) BOOL isImage; 14 | @end 15 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/MKAppKit/MKAppKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "MKLoadingManagerView.h" 14 | #import "MKCrashGuardManager.h" 15 | #import "MKDropdownMailTF.h" 16 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKHttpDetailVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | #import "MKHttpDatasource.h" 10 | #import "MKBaseVC.h" 11 | 12 | @interface MKHttpDetailVC : MKBaseVC 13 | 14 | @property (nonatomic,strong) MKHttpModel * detail; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSNull+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSNull (MKCrashGuard) 13 | 14 | + (void)guardNSNull; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKLaunchMonitor/NSObject+MKTTimeLoad.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | static NSMutableArray *_loadInfoArray; 13 | 14 | @interface NSObject (MKTTimeLoad) 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSELCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKSELCrashGuard) 13 | 14 | + (void)guardUnrecognizedSelectorCrash; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icon.jpeg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSELCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKSELCrashGuard) 13 | 14 | + (void)guardUnrecognizedSelectorCrash; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_MKAppVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_MKAppVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSNumber+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+MKCrashGuard.h 3 | // MKAppKit 4 | // 5 | // Created by apple on 2019/6/14. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSNumber (MKCrashGuard) 13 | 14 | /* 15 | 可避免以下crash 16 | isEqualToNumber: 17 | compare: 18 | */ 19 | + (void)guardNSNumberCrash; 20 | 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSObject+MKGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/16. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKGuard) 13 | /** 14 | @brief 添加一个block,当该对象释放时被调用 15 | **/ 16 | - (void)guard_addDeallocBlock:(void(^)(void))block; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKDebugVC.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "MKDebugVC.h" 10 | 11 | @interface MKDebugVC () 12 | 13 | @end 14 | 15 | @implementation MKDebugVC 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.view.backgroundColor = [UIColor whiteColor]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKCrashMonitor/MKCrashMonitor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MKCrashMonitor : NSObject 13 | 14 | @end 15 | 16 | void mk_registerCrashHandler(void); 17 | void mk_reportCrash(NSString *crashLog); 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSTimer+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSTimer (MKCrashGuard) 13 | 14 | /** 15 | * 防护 强引用 以及 target 提前销毁 16 | * 17 | */ 18 | 19 | + (void)guardTimerCrash; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKCrashHelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | @interface MKCrashHelper : NSObject 11 | 12 | + (instancetype)sharedInstance; 13 | - (void)install; 14 | - (NSDictionary* )crashForKey:(NSString* )key; 15 | - (NSArray* )crashPlist; 16 | - (NSArray* )crashLogs; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/UINavigationController+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface UINavigationController (MKCrashGuard) 14 | 15 | /** 16 | * 防护 重复跳转 17 | */ 18 | + (void)guardNavigationController; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSSet (MKCrashGuard) 13 | /** 防护 14 | * 15 | * + (instancetype)setWithObject:(ObjectType)object; 16 | */ 17 | + (void)crashGuardExchangeMethod; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSTimer+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSTimer (MKCrashGuard) 13 | 14 | /** 15 | * 防护 强引用 以及 target 提前销毁 16 | * 17 | */ 18 | 19 | + (void)guardTimerCrash; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKNotificationCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKNotificationCrashGuard) 13 | 14 | /** 15 | * 防护 添加 通知后,没有删除导致的 crash 16 | */ 17 | + (void)guardNotificationCrash; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/UINavigationController+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface UINavigationController (MKCrashGuard) 14 | 15 | /** 16 | * 防护 重复跳转 17 | */ 18 | + (void)guardNavigationController; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSCache+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/13. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSCache (MKCrashGuard) 13 | 14 | /* 15 | 可避免以下crash 16 | setObject:forKey: 17 | setObject:forKey:cost: 18 | 19 | */ 20 | + (void)guardNSCacheCrash; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSSet (MKCrashGuard) 13 | /** 防护 14 | * 15 | * + (instancetype)setWithObject:(ObjectType)object; 16 | */ 17 | + (void)crashGuardExchangeMethod; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKNotificationCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKNotificationCrashGuard) 13 | 14 | /** 15 | * 防护 添加 通知后,没有删除导致的 crash 16 | */ 17 | + (void)guardNotificationCrash; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVOCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKKVOCrashGuard) 13 | 14 | /** 15 | * 防护:添加监听后没有清除、清除不存在的key、添加重复的key 3 种情况导致的 crash 16 | */ 17 | + (void)guardKVOCrash; 18 | 19 | - (void)mk_cleanKVO; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdm-icon-plus.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdm-icon-plus@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-star.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdm-icon-star.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdm-icon-star@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSTimer+MKCategory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | #import 8 | 9 | @interface NSTimer (MKCategory) 10 | 11 | + (NSTimer *)mk_timerWithTimeInterval:(NSTimeInterval)ti repeats:(BOOL)yesOrNo handler:(void(^)(void))handler; 12 | + (NSTimer *)mk_scheduledTimerWithTimeInterval:(NSTimeInterval)ti repeats:(BOOL)yesOrNo handler:(void(^)(void))handler; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableSet (MKCrashGuard) 13 | /** 防护 14 | * 15 | * - (void)addObject:(ObjectType)object; 16 | * - (void)removeObject:(ObjectType)object; 17 | */ 18 | + (void)crashGuardExchangeMethod; 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdm-bg-addbutton.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdm-bg-addbutton@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdm-bg-menuitem.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdm-bg-menuitem@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVOCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKKVOCrashGuard) 13 | 14 | /** 15 | * 防护:添加监听后没有清除、清除不存在的key、添加重复的key 3 种情况导致的 crash 16 | */ 17 | + (void)guardKVOCrash; 18 | 19 | - (void)mk_cleanKVO; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCellView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface MKPushTableCellView : UIView 11 | @property (strong,nonatomic) UITableView *tableCellView; 12 | @property (strong,nonatomic) NSArray *data; 13 | 14 | // 控制cell的滚动 15 | @property (assign,nonatomic) NSInteger index; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCellView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface MKPushTableCellView : UIView 11 | @property (strong,nonatomic) UITableView *tableCellView; 12 | @property (strong,nonatomic) NSArray *data; 13 | 14 | // 控制cell的滚动 15 | @property (assign,nonatomic) NSInteger index; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableSet+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableSet (MKCrashGuard) 13 | /** 防护 14 | * 15 | * - (void)addObject:(ObjectType)object; 16 | * - (void)removeObject:(ObjectType)object; 17 | */ 18 | + (void)crashGuardExchangeMethod; 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-icon-plus-highlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdm-icon-plus-highlighted.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdm-icon-plus-highlighted@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /dev/MKApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MKApp 4 | // 5 | // Created by https://github.com/mythkiven/ on 2019/4/28. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | //#import "MKLaunchMonitor.h" 12 | #import "MKPointWatch.h" 13 | 14 | 15 | int main(int argc, char * argv[]) { 16 | @autoreleasepool { 17 | [[MKPointWatch pointWatch] startWatching]; 18 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-menuitem-highlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdm-bg-menuitem-highlighted.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdm-bg-menuitem-highlighted@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKWatchDog/MKMainThreadWatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/24. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @interface MKMainThreadWatch : NSObject 12 | 13 | /** 14 | 15 | @param threshold 间隔时长 16 | @param strictMode 处理方式 17 | @return MKMainThreadWatch 18 | */ 19 | - (instancetype)initWithThreshold:(double)threshold strictMode:(BOOL)strictMode; 20 | 21 | @end 22 | 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /MKAppKit/MKFoundation/MKLockSentinel.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/16. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "MKLockSentinel.h" 9 | 10 | @implementation MKLockSentinel { 11 | id lock_; 12 | } 13 | 14 | - (id)initWithLock:(id)obj { 15 | if (self = [super init]) { 16 | lock_ = obj; 17 | [lock_ lock]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)dealloc { 23 | NSLog(@"--->delloc"); 24 | [lock_ unlock]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/mkdiffusemenu/mkdm-bg-addbutton-highlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mkdiffusemenu-bg-addbutton-highlighted.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "mkdiffusemenu-bg-addbutton-highlighted@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableDictionary (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (void)setObject:(id)anObject forKey:(id)aKey 17 | * - (void)removeObjectForKey:(id)aKey 18 | * 19 | */ 20 | + (void)crashGuardExchangeMethod; 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | 25 | 26 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableDictionary (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (void)setObject:(id)anObject forKey:(id)aKey 17 | * - (void)removeObjectForKey:(id)aKey 18 | * 19 | */ 20 | + (void)crashGuardExchangeMethod; 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | 25 | 26 | -------------------------------------------------------------------------------- /dev/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MKAppKit.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-MKApp.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKDradualLoadingView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKDradualLoadingView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/16. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | // 外层的渐变动画 12 | 13 | @interface MKDradualLoadingView : UIButton 14 | /** 渐变线宽 默认10*/ 15 | @property (nonatomic, assign) CGFloat lineWidth; 16 | /** 渐变线的颜色 默认redColor*/ 17 | @property (nonatomic, strong) UIColor *lineColor; 18 | 19 | /** 开始动画 */ 20 | - (void)startAnimation; 21 | /** 结束动画 */ 22 | - (void)stopAnimation; 23 | 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSNull+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "NSNull+MKCrashGuard.h" 10 | #import "MKException.h" 11 | #import "NSObject+MKSwizzleHook.h" 12 | #import 13 | 14 | MK_SYNTH_DUMMY_CLASS(NSNull_MKCrashGuard) 15 | @implementation NSNull (MKCrashGuard) 16 | 17 | + (void)guardNSNull { 18 | // mk_swizzleInstanceMethod(self,@selector(length),@selector(guardLength)); 19 | } 20 | 21 | - (NSInteger)guardLength { 22 | return 0; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Created by https://github.com/mythkiven/ on 15/11/12. 4 | // Copyright © 2015年 3code. All rights reserved. 5 | // 6 | 7 | #import 8 | 9 | @interface MKDropdownMailTFCell : UITableViewCell 10 | 11 | /// label离tableView左边的距离 12 | @property (assign, nonatomic) CGFloat leftEdge; 13 | 14 | @property (strong, nonatomic) NSString *emailText; 15 | 16 | @property (strong, nonatomic) UILabel *emailLabel; 17 | 18 | /// 填充整个cell的button,用来响应点击事件(tableView的didSelect代理方法在自定义cell重用时不好用) 19 | @property (weak, nonatomic) IBOutlet UIButton *touchButton; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKDradualLoadingView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKDradualLoadingView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/16. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | // 外层的渐变动画 12 | 13 | @interface MKDradualLoadingView : UIButton 14 | /** 渐变线宽 默认10*/ 15 | @property (nonatomic, assign) CGFloat lineWidth; 16 | /** 渐变线的颜色 默认redColor*/ 17 | @property (nonatomic, strong) UIColor *lineColor; 18 | 19 | /** 开始动画 */ 20 | - (void)startAnimation; 21 | /** 结束动画 */ 22 | - (void)stopAnimation; 23 | 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSNull+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "NSNull+MKCrashGuard.h" 10 | #import "MKException.h" 11 | #import "NSObject+MKSwizzleHook.h" 12 | #import 13 | 14 | MK_SYNTH_DUMMY_CLASS(NSNull_MKCrashGuard) 15 | @implementation NSNull (MKCrashGuard) 16 | 17 | + (void)guardNSNull { 18 | // mk_swizzleInstanceMethod(self,@selector(length),@selector(guardLength)); 19 | } 20 | 21 | - (NSInteger)guardLength { 22 | return 0; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKCrashMonitor/MKCrashCaught.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | void mk_registerSignalHandler(void); 11 | void mk_registerExceptionHandler(void); 12 | 13 | /** 14 | 根据 key 获取 crash 15 | */ 16 | NSDictionary *mk_crashForKey(NSString *key); 17 | /** 18 | 获取全部 crash 文件 19 | */ 20 | NSArray *mk_getCrashPlist(void); 21 | /** 22 | 获取全部 crash 文件 23 | */ 24 | NSArray *mk_getCrashLogs(void); 25 | /** 26 | 获取全部 crash 文件 27 | */ 28 | NSDictionary *mk_getCrashReport(void); 29 | 30 | -------------------------------------------------------------------------------- /dev/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MKAppKit/MKCombineLoadingAnimation (0.1.1) 3 | - MKAppKit/MKCrashGuard (0.1.1) 4 | - MKAppKit/MKDiffuseMenu (0.1.1) 5 | - MKAppKit/MKDropdownMailTF (0.1.1) 6 | 7 | DEPENDENCIES: 8 | - MKAppKit/MKCombineLoadingAnimation (from `../`) 9 | - MKAppKit/MKCrashGuard (from `../`) 10 | - MKAppKit/MKDiffuseMenu (from `../`) 11 | - MKAppKit/MKDropdownMailTF (from `../`) 12 | 13 | EXTERNAL SOURCES: 14 | MKAppKit: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | MKAppKit: 9785fbd36f346deafba9832d3083a5b4254f26cf 19 | 20 | PODFILE CHECKSUM: 07cf71dff74b166ddc6b587c6414ea8ee77b4936 21 | 22 | COCOAPODS: 1.7.0 23 | -------------------------------------------------------------------------------- /dev/MKApp.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MKApp.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 18BB8F6A227318F6005EDC27 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Created by https://github.com/mythkiven/ on 15/11/12. 4 | // Copyright © 2015年 3code. All rights reserved. 5 | // 6 | 7 | #import 8 | 9 | @interface MKDropdownMailTFCell : UITableViewCell 10 | 11 | /// label离tableView左边的距离 12 | @property (assign, nonatomic) CGFloat leftEdge; 13 | 14 | @property (strong, nonatomic) NSString *emailText; 15 | 16 | @property (strong, nonatomic) UILabel *emailLabel; 17 | 18 | /// 填充整个cell的button,用来响应点击事件(tableView的didSelect代理方法在自定义cell重用时不好用) 19 | @property (weak, nonatomic) IBOutlet UIButton *touchButton; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSUserDefaults+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/13. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSUserDefaults (MKCrashGuard) 13 | 14 | /* 15 | 可避免以下方法 key=nil时的crash 16 | 1.objectForKey: 17 | 2.stringForKey: 18 | 3.arrayForKey: 19 | 4.dataForKey: 20 | 5.URLForKey: 21 | 6.stringArrayForKey: 22 | 7.floatForKey: 23 | 8.doubleForKey: 24 | 9.integerForKey: 25 | 10.boolForKey: 26 | 11.setObject:forKey: 27 | */ 28 | + (void)guardUserDefaultsCrash; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /MKAppKit/MKFoundation/MKLockSentinel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/16. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | #define MKLOCKGUARD(lock) \ 11 | MKLockSentinel *_guard_ = [[MKLockSentinel alloc] initWithLock:lock];\ 12 | NSAssert(_guard_, @"_guard_ invaild"); 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface MKLockSentinel : NSObject 17 | 18 | /** 19 | 哨兵类,使用方式: 20 | MKLOCKGUARD(lock)。 21 | 注意:哨兵类在作用域结束会自动释放,有疑问可以尝试在dealloc中log。 22 | 23 | @param obj NSLock 24 | @return MKLockSentinel 25 | */ 26 | - (id)initWithLock:(id)obj; 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVCCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKKVCCrashGuard) 13 | 14 | /** 防护如下方法 15 | * - (void)setValue:(nullable id)value forKey:(NSString *)key; 16 | * - (void)setValue:(nullable id)value forKeyPath:(NSString *)keyPath; 17 | * - (void)setValue:(nullable id)value forUndefinedKey:(NSString *)key; 18 | * - (void)setValuesForKeysWithDictionary:(NSDictionary *)keyedValues; 19 | */ 20 | + (void)guardKVCCrash; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Created by https://github.com/mythkiven/ on 15/11/12. 4 | // Copyright © 2015年 3code. All rights reserved. 5 | // 6 | #import "MKDropdownMailTFCell.h" 7 | 8 | @implementation MKDropdownMailTFCell 9 | 10 | - (void)awakeFromNib { 11 | [super awakeFromNib]; 12 | self.emailLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.leftEdge, 0, self.frame.size.width-self.leftEdge, self.frame.size.height)]; 13 | self.emailLabel.textColor = [UIColor lightGrayColor]; 14 | [self addSubview:self.emailLabel]; 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/MKAppKit/MKAppKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MKAppKit" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKWatchDog/MKRunLoopWatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | #define MKMainThreadWatcher_Interval (16.0f/1000.0f) 13 | 14 | 15 | @interface MKRunLoopWatch : NSObject 16 | 17 | 18 | @property (nonatomic) BOOL isMonitoring; 19 | 20 | + (instancetype)shareInstance; 21 | - (void)beginMonitor; 22 | - (void)endMonitor; 23 | 24 | /** 25 | 开始Render监控 26 | 27 | @param pathToSaveLog 保存render日志的绝对路径,路径不正确将使用默认路径,为nil则不保存 28 | */ 29 | + (void)watchRenderWithLogPath:(nullable NSString*)pathToSaveLog; 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVCCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSObject (MKKVCCrashGuard) 13 | 14 | /** 防护如下方法 15 | * - (void)setValue:(nullable id)value forKey:(NSString *)key; 16 | * - (void)setValue:(nullable id)value forKeyPath:(NSString *)keyPath; 17 | * - (void)setValue:(nullable id)value forUndefinedKey:(NSString *)key; 18 | * - (void)setValuesForKeysWithDictionary:(NSDictionary *)keyedValues; 19 | */ 20 | + (void)guardKVCCrash; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /dev/MKApp/Test/UTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // UTest.h 3 | // MKApp 4 | // 5 | // Created by apple on 2019/6/28. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface UTest : NSObject 15 | 16 | @end 17 | 18 | 19 | 20 | @interface RenderTest : NSObject 21 | - (void)renderTest; 22 | @end 23 | 24 | 25 | 26 | @interface CaseTest : NSObject 27 | - (void)test; 28 | @end 29 | 30 | 31 | 32 | 33 | 34 | @interface CrashCaughtTest : NSObject 35 | + (void)testExceptionCrashCaught; 36 | + (void)testSigCrashCaught; 37 | 38 | @end 39 | 40 | 41 | 42 | @interface testViewController : UIViewController 43 | @end 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTFCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Created by https://github.com/mythkiven/ on 15/11/12. 4 | // Copyright © 2015年 3code. All rights reserved. 5 | // 6 | #import "MKDropdownMailTFCell.h" 7 | 8 | @implementation MKDropdownMailTFCell 9 | 10 | - (void)awakeFromNib { 11 | [super awakeFromNib]; 12 | self.emailLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.leftEdge, 0, self.frame.size.width-self.leftEdge, self.frame.size.height)]; 13 | self.emailLabel.textColor = [UIColor lightGrayColor]; 14 | [self addSubview:self.emailLabel]; 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSSet+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSSet+MKCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | 12 | 13 | @implementation NSSet (MKCrashGuard) 14 | + (void)crashGuardExchangeMethod { 15 | [NSSet mk_swizzleClassMethod:@selector(setWithObject:) withSwizzleMethod:@selector(guardSetWithObject:)]; 16 | } 17 | 18 | + (instancetype)guardSetWithObject:(id)object { 19 | if (object){ 20 | return [self guardSetWithObject:object]; 21 | } 22 | mkHandleCrashException(@"NSSet setWithObject nil object"); 23 | return nil; 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /doc/MKDropdownMailTF.md: -------------------------------------------------------------------------------- 1 | # MKDropdownMailTF 2 | 具有邮箱下拉提示 textField,类似新浪微博邮箱登录的效果,输入 “@” 后自动关联邮箱后缀。自动匹配输入的字符。 3 | 4 | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKDropdownMailTF.gif) 5 | 6 | ### 使用: 7 | 8 | JPullEmailTF *textField = [[JPullEmailTF alloc] initWithFrame:self.holderView.frame InView:self.view]; 9 | 10 | ### 使用自定义样式: 11 | // 自定义下拉列表的颜色,字体,frame 等信息 12 | textField.mailCellHeight = 40; 13 | textField.mailFont = [UIFont systemFontOfSize:16]; 14 | textField.MailFontColor = [UIColor redColor]; 15 | textField.mailCellColor = [UIColor lightGrayColor]; 16 | textField.mailBgColor = [UIColor yellowColor]; 17 | 18 | // 传入后缀数据源: 19 | textField.mailsuffixData = @[@"live.com", @"126.com", @"gmail.com",@"qq.com"]; 20 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSSet+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSSet+MKCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | 12 | 13 | @implementation NSSet (MKCrashGuard) 14 | + (void)crashGuardExchangeMethod { 15 | [NSSet mk_swizzleClassMethod:@selector(setWithObject:) withSwizzleMethod:@selector(guardSetWithObject:)]; 16 | } 17 | 18 | + (instancetype)guardSetWithObject:(id)object { 19 | if (object){ 20 | return [self guardSetWithObject:object]; 21 | } 22 | mkHandleCrashException(@"NSSet setWithObject nil object"); 23 | return nil; 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /dev/MKAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /dev/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | workspace 'MKApp.xcworkspace' 4 | project 'MKApp.xcodeproj' 5 | 6 | #target :MKCombineLoadingAnimation do 7 | # platform:ios,'9.0' 8 | # project 'devDemo/MKCombineLoadingAnimation/MKCombineLoadingAnimation.xcodeproj' 9 | # pod 'MKAppKit/MKCombineLoadingAnimation', :path => '../' 10 | #end 11 | 12 | target 'MKApp' do 13 | platform:ios,'9.0' 14 | 15 | # pod 'MKAppKit/MKCombineLoadingAnimation' 16 | # pod 'MKAppKit/MKDropdownMailTF' 17 | # pod 'MKAppKit/MKDiffuseMenu' 18 | # pod 'MKAppKit/MKCrashGuard' 19 | 20 | pod 'MKAppKit/MKCrashGuard', :path => '../' 21 | pod 'MKAppKit/MKCombineLoadingAnimation', :path => '../' 22 | pod 'MKAppKit/MKDropdownMailTF', :path => '../' 23 | pod 'MKAppKit/MKDiffuseMenu', :path => '../' 24 | 25 | end 26 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSFileManager+MKCategory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | @interface NSFileManager (MKCategory) 11 | 12 | /* 13 | 快速计算文件/目录的size 14 | 返回实际的byte数 15 | */ 16 | - (uint64_t)mk_fileSizeAtPath:(NSString *)filePath; 17 | 18 | /* 19 | 快速计算文件/目录的size 20 | 返回占用磁盘空间 21 | */ 22 | - (uint64_t)mk_diskSizeAtPath:(NSString *)filePath; 23 | 24 | /* 25 | 返回是否为替身文件 26 | */ 27 | - (BOOL)mk_isAlias:(NSString *)aliasPath; 28 | 29 | /* 30 | 返回替身文件的原身 31 | */ 32 | - (NSString *)mk_resolvingAlias:(NSString *)aliasPath; 33 | 34 | /* 35 | 创建替身文件 36 | */ 37 | - (BOOL)mk_createAlias:(NSString *)aliasPath fromPath:(NSString *)originalPath; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (MKCrashGuard) 14 | 15 | /** 16 | 防护 Unrecognized 17 | @param isGuardUnrecognized 是否防护 Unrecognized 18 | */ 19 | + (void)mk_guardSelector:(BOOL)isGuardUnrecognized DEPRECATED_MSG_ATTRIBUTE("Please use [NSObject guardUnrecognizedSelectorCrash]"); 20 | 21 | /** 22 | 防护 Unrecognized 23 | @param classPrefixs 需要防护的类名或类名前缀 24 | */ 25 | + (void)mk_guardSelectorWithClassPrefixs:(NSArray *)classPrefixs DEPRECATED_MSG_ATTRIBUTE("Please use [NSObject guardUnrecognizedSelectorCrash]"); 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (MKCrashGuard) 14 | 15 | /** 16 | 防护 Unrecognized 17 | @param isGuardUnrecognized 是否防护 Unrecognized 18 | */ 19 | + (void)mk_guardSelector:(BOOL)isGuardUnrecognized DEPRECATED_MSG_ATTRIBUTE("Please use [NSObject guardUnrecognizedSelectorCrash]"); 20 | 21 | /** 22 | 防护 Unrecognized 23 | @param classPrefixs 需要防护的类名或类名前缀 24 | */ 25 | + (void)mk_guardSelectorWithClassPrefixs:(NSArray *)classPrefixs DEPRECATED_MSG_ATTRIBUTE("Please use [NSObject guardUnrecognizedSelectorCrash]"); 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /MKAppKit/MKTool/MKThreadTrace.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | 11 | 12 | #define MKTTLOG NSLog(@"%@",[MKThreadTrace mkThreadTraceOfCurrentThread]); 13 | #define MKTTLOG_MAIN NSLog(@"%@",[MKThreadTrace mkThreadTraceOfMainThread]); 14 | #define MKTTLOG_ALL NSLog(@"%@",[MKThreadTrace mkThreadTraceOfAllThread]); 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | @interface MKThreadTrace : NSObject 20 | 21 | + (NSString *)mkThreadTraceOfAllThread; 22 | + (NSString *)mkThreadTraceOfCurrentThread; 23 | + (NSString *)mkThreadTraceOfMainThread; 24 | + (NSString *)mkThreadTraceOfNSThread:(NSThread *)thread; 25 | 26 | extern NSString *mk_callStackSymbols(void); 27 | 28 | @end 29 | 30 | 31 | 32 | 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSDictionary (MKCrashGuard) 13 | 14 | /** 15 | * 支持防护 16 | * +(instancetype)dictionaryWithObjects:(const id _Nonnull __unsafe_unretained *)objects forKeys:(const id _Nonnull __unsafe_unretained *)keys count:(NSUInteger)cnt 快速创建方式 17 | * +(instancetype)dictionaryWithObject:(ObjectType)object forKey:(KeyType )key; 18 | * -(instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType _Nonnull [_Nullable])keys count:(NSUInteger)cnt 19 | */ 20 | + (void)crashGuardExchangeMethod; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardConst.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | 11 | #define MKCrashGuardSystemVersion(version) ([[UIDevice currentDevice].systemVersion floatValue] >= version) 12 | 13 | #ifdef DEBUG 14 | #define MKCrashGuardLog(fmt, ...) NSLog((@"MKCrashGuardLog:" fmt), ##__VA_ARGS__) 15 | #else 16 | #define MKCrashGuardLog(...) 17 | #endif 18 | 19 | #ifndef MK_SYNTH_DUMMY_CLASS 20 | #define MK_SYNTH_DUMMY_CLASS(_name_) \ 21 | @interface MK_SYNTH_DUMMY_CLASS ## _name_ : NSObject @end \ 22 | @implementation MK_SYNTH_DUMMY_CLASS ## _name_ @end 23 | #endif 24 | 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @interface MKCrashGuardConst : NSObject 29 | 30 | - (void)mkProxyMethod; 31 | 32 | @end 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSArray (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * + (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt; 即 快速创建方式 17 | * - (id)objectAtIndex:(NSUInteger)index 18 | * - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes; 19 | * - (ObjectType)objectAtIndex:(NSUInteger)index; 20 | * - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx 21 | * - (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nonnull])objects range:(NSRange)range 22 | * 23 | */ 24 | + (void)crashGuardExchangeMethod; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | 30 | 31 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKCrashMonitor/MKCrashMonitor.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "MKCrashMonitor.h" 9 | #import "MKCrashCaught.h" 10 | 11 | 12 | @implementation MKCrashMonitor 13 | 14 | 15 | @end 16 | 17 | void mk_registerCrashHandler(void){ 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | mk_registerSignalHandler(); 21 | mk_registerExceptionHandler(); 22 | }); 23 | 24 | NSArray *a1 = mk_getCrashPlist(); 25 | NSArray *a2 = mk_getCrashLogs(); 26 | NSDictionary *a3 = mk_getCrashReport(); 27 | 28 | NSLog(@"%@",a1); 29 | NSLog(@"%@",a2); 30 | NSLog(@"%@",a3); 31 | /** 32 | 根据 key 获取 crash 33 | */ 34 | 35 | } 36 | void mk_reportCrash(NSString *crashLog) { 37 | 38 | } 39 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableString (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString 17 | * - (void)insertString:(NSString *)aString atIndex:(NSUInteger)loc 18 | * - (void)deleteCharactersInRange:(NSRange)range 19 | * - (void)appendString:(NSString *)aString; 20 | * - (NSString *)substringFromIndex:(NSUInteger)from; 21 | * - (NSString *)substringToIndex:(NSUInteger)to; 22 | * - (NSString *)substringWithRange:(NSRange)range; 23 | */ 24 | + (void)crashGuardExchangeMethod; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSDictionary+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSDictionary (MKCrashGuard) 13 | 14 | /** 15 | * 支持防护 16 | * +(instancetype)dictionaryWithObjects:(const id _Nonnull __unsafe_unretained *)objects forKeys:(const id _Nonnull __unsafe_unretained *)keys count:(NSUInteger)cnt 快速创建方式 17 | * +(instancetype)dictionaryWithObject:(ObjectType)object forKey:(KeyType )key; 18 | * -(instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType _Nonnull [_Nullable])keys count:(NSUInteger)cnt 19 | */ 20 | + (void)crashGuardExchangeMethod; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/MKCrashGuardConst.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | 11 | #define MKCrashGuardSystemVersion(version) ([[UIDevice currentDevice].systemVersion floatValue] >= version) 12 | 13 | #ifdef DEBUG 14 | #define MKCrashGuardLog(fmt, ...) NSLog((@"MKCrashGuardLog:" fmt), ##__VA_ARGS__) 15 | #else 16 | #define MKCrashGuardLog(...) 17 | #endif 18 | 19 | #ifndef MK_SYNTH_DUMMY_CLASS 20 | #define MK_SYNTH_DUMMY_CLASS(_name_) \ 21 | @interface MK_SYNTH_DUMMY_CLASS ## _name_ : NSObject @end \ 22 | @implementation MK_SYNTH_DUMMY_CLASS ## _name_ @end 23 | #endif 24 | 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @interface MKCrashGuardConst : NSObject 29 | 30 | - (void)mkProxyMethod; 31 | 32 | @end 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSArray (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * + (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt; 即 快速创建方式 17 | * - (id)objectAtIndex:(NSUInteger)index 18 | * - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes; 19 | * - (ObjectType)objectAtIndex:(NSUInteger)index; 20 | * - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx 21 | * - (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nonnull])objects range:(NSRange)range 22 | * 23 | */ 24 | + (void)crashGuardExchangeMethod; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | 30 | 31 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableString (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString 17 | * - (void)insertString:(NSString *)aString atIndex:(NSUInteger)loc 18 | * - (void)deleteCharactersInRange:(NSRange)range 19 | * - (void)appendString:(NSString *)aString; 20 | * - (NSString *)substringFromIndex:(NSUInteger)from; 21 | * - (NSString *)substringToIndex:(NSUInteger)to; 22 | * - (NSString *)substringWithRange:(NSRange)range; 23 | */ 24 | + (void)crashGuardExchangeMethod; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MKAppKit" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit" 5 | OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit/MKAppKit.modulemap" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MKAppKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit/MKAppKit.modulemap" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit" 13 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MKAppKit" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit" 5 | OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit/MKAppKit.modulemap" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MKAppKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit/MKAppKit.modulemap" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MKAppKit" 13 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKLoadingManagerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKLoadingManagerView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/18. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import "MKControlLoadingCircleView.h" 11 | #import "MKPushTableCellView.h" 12 | 13 | 14 | typedef NS_ENUM(NSInteger, MKLoadingManagerType) { 15 | MKLoadingManagerTypeImage = 10, 16 | MKLoadingManagerTypeColor, 17 | MKLoadingManagerTypeOther, 18 | }; 19 | 20 | @interface MKLoadingManagerView : UIView 21 | 22 | @property (nonatomic, assign) MKLoadingManagerType loadingType; 23 | 24 | /** 启动动画 25 | */ 26 | -(void)startAnimationWithPercent:(CGFloat) end duration:(CGFloat)duration; 27 | 28 | /** 动画控制 29 | */ 30 | -(void)startAnimationWithPercent:(CGFloat)begin endPercent:(CGFloat)end duration:(CGFloat)duration ; 31 | 32 | /** 结束动画 33 | */ 34 | -(void)stopAnimation; 35 | 36 | 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSString+MKCategory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | @interface NSString (MKCategory) 11 | 12 | #pragma mark 拼音 13 | 14 | /* 15 | 返回汉字拼音,无声调 16 | */ 17 | - (NSString *)mk_pinyin; 18 | 19 | /* 20 | 返回汉字拼音,包含声调 21 | */ 22 | - (NSString *)mk_pinyinAndTone; 23 | 24 | #pragma mark SIZE 25 | 26 | /* 27 | 以1024作单位换算,默认至少保留3位有效数字 28 | */ 29 | + (NSString *)mk_stringFromFileSize:(uint64_t)byteCount; 30 | 31 | /* 32 | 以1000作单位换算,默认至少保留3位有效数字 33 | */ 34 | + (NSString *)mk_stringFromDiskSize:(uint64_t)byteCount; 35 | 36 | /* 37 | byteCount:byte数量 38 | delimiter:数字与单位之间的间隔 39 | diskMode:YES时以1000作单位换算,NO时以1024作单位换算 40 | significant:保留有效长度 41 | */ 42 | + (NSString *)mk_stringFromSize:(uint64_t)byteCount delimiter:(NSString *)delimiter diskMode:(BOOL)diskMode significant:(uint8_t)length; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKLoadingManagerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKLoadingManagerView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/18. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import "MKControlLoadingCircleView.h" 11 | #import "MKPushTableCellView.h" 12 | 13 | 14 | typedef NS_ENUM(NSInteger, MKLoadingManagerType) { 15 | MKLoadingManagerTypeImage = 10, 16 | MKLoadingManagerTypeColor, 17 | MKLoadingManagerTypeOther, 18 | }; 19 | 20 | @interface MKLoadingManagerView : UIView 21 | 22 | @property (nonatomic, assign) MKLoadingManagerType loadingType; 23 | 24 | /** 启动动画 25 | */ 26 | -(void)startAnimationWithPercent:(CGFloat) end duration:(CGFloat)duration; 27 | 28 | /** 动画控制 29 | */ 30 | -(void)startAnimationWithPercent:(CGFloat)begin endPercent:(CGFloat)end duration:(CGFloat)duration ; 31 | 32 | /** 结束动画 33 | */ 34 | -(void)stopAnimation; 35 | 36 | 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /dev/MKAppTests/MKAppTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKAppTests.m 3 | // MKAppTests 4 | // 5 | // Created by apple on 2019/5/30. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MKAppTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MKAppTests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | } 20 | 21 | - (void)tearDown { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | - (void)testExample { 26 | // This is an example of a functional test case. 27 | // Use XCTAssert and related functions to verify your tests produce the correct results. 28 | } 29 | 30 | - (void)testPerformanceExample { 31 | // This is an example of a performance test case. 32 | [self measureBlock:^{ 33 | // Put the code you want to measure the time of here. 34 | }]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSTimer+MKCategory.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSTimer+MKCategory.h" 9 | 10 | @implementation NSTimer (MKCategory) 11 | 12 | + (NSTimer *)mk_timerWithTimeInterval:(NSTimeInterval)ti repeats:(BOOL)yesOrNo handler:(void(^)(void))handler 13 | { 14 | return [self timerWithTimeInterval:ti target:self selector:@selector(_timerHandler:) userInfo:[handler copy] repeats:yesOrNo]; 15 | } 16 | 17 | + (NSTimer *)mk_scheduledTimerWithTimeInterval:(NSTimeInterval)ti repeats:(BOOL)yesOrNo handler:(void(^)(void))handler 18 | { 19 | return [self scheduledTimerWithTimeInterval:ti target:self selector:@selector(_timerHandler:) userInfo:[handler copy] repeats:yesOrNo]; 20 | } 21 | 22 | + (void)_timerHandler:(NSTimer *)inTimer; 23 | { 24 | if (inTimer.userInfo) 25 | { 26 | void(^handler)(void) = [inTimer userInfo]; 27 | handler(); 28 | } 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKURLCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKURLCategory.h 3 | // MKApp 4 | // 5 | // Created by apple on 2019/7/2. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MKURLCategory : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | 19 | 20 | 21 | @interface NSURLRequest (MKIdentify) 22 | - (NSString *)requestId; 23 | - (void)setRequestId:(NSString *)requestId; 24 | - (NSNumber*)startTime; 25 | - (void)setStartTime:(NSNumber*)startTime; 26 | @end 27 | 28 | 29 | @interface NSURLResponse (MKData) 30 | - (NSData *)responseData; 31 | - (void)setResponseData:(NSData *)responseData; 32 | @end 33 | 34 | 35 | @interface NSURLSession (MKSwizzling) 36 | @end 37 | 38 | @interface NSURLSessionTask (MKData) 39 | - (NSString*)taskDataIdentify; 40 | - (void)setTaskDataIdentify:(NSString*)name; 41 | - (NSMutableData*)responseDatas; 42 | - (void)setResponseDatas:(NSMutableData*)data; 43 | @end 44 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableArray (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (id)objectAtIndex:(NSUInteger)index 17 | * - (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx 18 | * - (void)removeObjectAtIndex:(NSUInteger)index 19 | * - (void)insertObject:(id)anObject atIndex:(NSUInteger)index 20 | * - (void)getObjects:(__unsafe_unretained id _Nonnull *)objects range:(NSRange)range 21 | * - (NSArray *)subarrayWithRange:(NSRange)range; 22 | * - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx 23 | * - (void)addObject:(ObjectType)anObject; 24 | * - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(ObjectType)anObject; 25 | */ 26 | + (void)crashGuardExchangeMethod; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | 32 | 33 | -------------------------------------------------------------------------------- /doc/MKCombineLoadingAnimation.md: -------------------------------------------------------------------------------- 1 | 2 | ## 说明 3 | 实际效果如下图: 4 | 5 | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKCombineLoadingAnimation.gif) 6 | 7 | 8 | **MKCombineLoadingAnimation 是一个组合的动画效果,其中的各部分都可以单独拿出来使用 ** 9 | 10 | ### 1、外层旋转动画 11 | 12 | 外层旋转动画有两种,可以使用绚丽的动画,或者简单的颜色渐变,参见 gif 演示。 13 | 14 | 1、颜色渐变的动画: 基于 Core Graphics 和 CAAnimation, 在类:JDradualLoadingView 中,使用 CGContextRef 和 CABasicAnimation 来实现的。 15 | 16 | 2、旋转的控制使用刷新频率精度较高的 CADisplayLink,颜色的渐变可根据具体需求使用图片或者代码实现。 17 | 18 | ### 2、内层的文字和转动的圆 19 | 20 | 因为要控制动画的启动、暂停,以及实际的加载速度,所以我也是基于 Core Graphics 使用 CGContextRef 来操作的。在类:JControlLoadingCircleLayer 中实现,因为是直接在 layer 中绘制,所以会有严重的锯齿现象。可以通过 21 | 22 | self.layer.contentsScale=[[UIScreen mainScreen] scale]; 23 | 24 | 来解决在 layer 上绘制的锯齿现象。 25 | 26 | 27 | ### 3、下方加载 cell 提示 28 | 使用 scrollToRowAtIndexPath 实现: 29 | 30 | [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; 31 | 32 | 这个组件写的挺早的,自从入坑区块链之后很少写 UI,本次整合到组件库,后续有时间会进一步优化。 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /dev/MKApp/Test/CrashTest.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/05/29. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | */ 8 | 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | 15 | @protocol TestDelegate 16 | 17 | - (void)didDiscoverDevice:(NSObject*)device; 18 | 19 | @end 20 | 21 | 22 | typedef void (^HttpFailed) (NSURLSessionDataTask*); 23 | 24 | 25 | @interface CrashTest : NSObject 26 | 27 | // test crash 28 | @property (nonatomic,copy) HttpFailed httpFailed; 29 | @property (nonatomic,weak) id delegate; 30 | @property (nonatomic,copy) NSMutableArray* marr; 31 | @property (nonatomic,copy) NSMutableDictionary* mdic; 32 | @property (nonatomic,copy) NSMutableString* mstring; 33 | @property (nonatomic,copy) NSMutableData* mdata; 34 | @property (nonatomic,copy) NSMutableSet* mset; 35 | @property (strong,nonatomic) NSTimer* timer; 36 | 37 | - (void)executeAllTest; 38 | -(void)nonselector; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableArray+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableArray (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (id)objectAtIndex:(NSUInteger)index 17 | * - (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx 18 | * - (void)removeObjectAtIndex:(NSUInteger)index 19 | * - (void)insertObject:(id)anObject atIndex:(NSUInteger)index 20 | * - (void)getObjects:(__unsafe_unretained id _Nonnull *)objects range:(NSRange)range 21 | * - (NSArray *)subarrayWithRange:(NSRange)range; 22 | * - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx 23 | * - (void)addObject:(ObjectType)anObject; 24 | * - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(ObjectType)anObject; 25 | */ 26 | + (void)crashGuardExchangeMethod; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | 32 | 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 MYTHKIVEN 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKWatchDog/MKFPSWatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | typedef NS_ENUM(NSUInteger, MKFPSWatchPosition) { 13 | MKFPSWatchPositionLeft, 14 | MKFPSWatchPositionMiddle, 15 | MKFPSWatchPositionRight 16 | }; 17 | 18 | typedef void(^FPSRecord)(NSDictionary *recordDic); 19 | 20 | @interface MKFPSWatch : NSObject 21 | 22 | @property (nonatomic, assign, getter = isEnabled) BOOL enabled; 23 | @property (nonatomic, assign) BOOL showLabel; 24 | @property (nonatomic, assign) UIWindowLevel windowLevel; 25 | @property (nonatomic, assign) MKFPSWatchPosition position; 26 | @property (nonatomic, readonly, getter = isRunning) BOOL running; 27 | @property (nonatomic, readonly) NSInteger droppedFrameCountInLastSecond; 28 | @property (nonatomic, readonly) NSInteger drawnFrameCountInLastSecond; 29 | @property (copy,nonatomic) FPSRecord recordRender ; 30 | 31 | + (instancetype)sharedFPSCounter; 32 | 33 | @end 34 | 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 MYTHKIVEN 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKBaseVC.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "MKBaseVC.h" 10 | 11 | @interface MKBaseVC () 12 | 13 | @end 14 | 15 | @implementation MKBaseVC 16 | 17 | - (void)dealloc { 18 | NSLog(@"%@ dealloc",[self class]); 19 | } 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | } 24 | 25 | - (void)viewDidAppear:(BOOL)animated { 26 | [super viewDidAppear:animated]; 27 | 28 | NSInteger count = self.navigationController.viewControllers.count; 29 | self.navigationController.interactivePopGestureRecognizer.enabled = count > 1; 30 | self.navigationController.interactivePopGestureRecognizer.delegate = self; 31 | 32 | } 33 | 34 | #pragma mark - gesture delegate 35 | - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { 36 | if (self.navigationController.viewControllers.count == 1){//关闭主界面的右滑返回 37 | return NO; 38 | }else{ 39 | return YES; 40 | } 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSObject+MKGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/16. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSObject+MKGuard.h" 9 | 10 | #import 11 | @interface MKParasite : NSObject 12 | @property (nonatomic, copy) void(^mkDeallocBlock)(void); 13 | @end 14 | @implementation MKParasite 15 | - (void)dealloc { 16 | if (self.mkDeallocBlock) { 17 | self.mkDeallocBlock(); 18 | } 19 | } 20 | @end 21 | 22 | @implementation NSObject (MKGuard) 23 | - (void)guard_addDeallocBlock:(void(^)(void))block { 24 | @synchronized (self) { 25 | static NSString *kAssociatedKey = nil; 26 | NSMutableArray *parasiteList = objc_getAssociatedObject(self, &kAssociatedKey); 27 | if (!parasiteList) { 28 | parasiteList = [NSMutableArray new]; 29 | objc_setAssociatedObject(self, &kAssociatedKey, parasiteList, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 30 | } 31 | MKParasite *parasite = [MKParasite new]; 32 | parasite.mkDeallocBlock = block; 33 | [parasiteList addObject: parasite]; 34 | } 35 | } 36 | @end 37 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableSet+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "NSMutableSet+MKCrashGuard.h" 10 | #import 11 | #import "MKException.h" 12 | #import "NSObject+MKSwizzleHook.h" 13 | 14 | 15 | @implementation NSMutableSet (MKCrashGuard) 16 | + (void)crashGuardExchangeMethod { 17 | NSMutableSet* instanceObject = [NSMutableSet new]; 18 | Class cls = object_getClass(instanceObject); 19 | mk_swizzleInstanceMethod(cls,@selector(addObject:), @selector(guardAddObject:)); 20 | mk_swizzleInstanceMethod(cls,@selector(removeObject:), @selector(guardRemoveObject:)); 21 | } 22 | 23 | - (void) guardAddObject:(id)object { 24 | if (object) { 25 | [self guardAddObject:object]; 26 | } else { 27 | mkHandleCrashException(@"NSSet addObject nil object"); 28 | } 29 | } 30 | 31 | - (void) guardRemoveObject:(id)object { 32 | if (object) { 33 | [self guardRemoveObject:object]; 34 | } else { 35 | mkHandleCrashException(@"NSSet removeObject nil object"); 36 | } 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableSet+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/09. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "NSMutableSet+MKCrashGuard.h" 10 | #import 11 | #import "MKException.h" 12 | #import "NSObject+MKSwizzleHook.h" 13 | 14 | 15 | @implementation NSMutableSet (MKCrashGuard) 16 | + (void)crashGuardExchangeMethod { 17 | NSMutableSet* instanceObject = [NSMutableSet new]; 18 | Class cls = object_getClass(instanceObject); 19 | mk_swizzleInstanceMethod(cls,@selector(addObject:), @selector(guardAddObject:)); 20 | mk_swizzleInstanceMethod(cls,@selector(removeObject:), @selector(guardRemoveObject:)); 21 | } 22 | 23 | - (void) guardAddObject:(id)object { 24 | if (object) { 25 | [self guardAddObject:object]; 26 | } else { 27 | mkHandleCrashException(@"NSSet addObject nil object"); 28 | } 29 | } 30 | 31 | - (void) guardRemoveObject:(id)object { 32 | if (object) { 33 | [self guardRemoveObject:object]; 34 | } else { 35 | mkHandleCrashException(@"NSSet removeObject nil object"); 36 | } 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/MKException.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKException.h 3 | // MKApp 4 | // 5 | // Created by apple on 2019/6/5. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MKCrashGuardConst.h" 11 | #import "MKCrashGuardManager.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | __attribute__((overloadable)) void mkHandleCrashException(NSException *exception); 16 | __attribute__((overloadable)) void mkHandleCrashException(NSException *exception,NSString *extraInfo); 17 | __attribute__((overloadable)) void mkHandleCrashException(NSString *exceptionMessage); 18 | __attribute__((overloadable)) void mkHandleCrashException(NSString *exceptionMessage,NSString *extraInfo); 19 | 20 | 21 | @interface MKException : NSObject 22 | 23 | @property(nonatomic,readwrite,weak) id delegate; 24 | 25 | @property(nonatomic,readwrite,assign) BOOL printLog; 26 | 27 | @property(nonatomic,readwrite,assign) MKCrashGuardType guardCrashType; 28 | 29 | + (instancetype)shareException; 30 | 31 | - (void)handleCrashInException:(nonnull NSException *)exceptionMessage extraInfo:(nullable NSString *)extraInfo; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/MKException.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKException.h 3 | // MKApp 4 | // 5 | // Created by apple on 2019/6/5. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MKCrashGuardConst.h" 11 | #import "MKCrashGuardManager.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | __attribute__((overloadable)) void mkHandleCrashException(NSException *exception); 16 | __attribute__((overloadable)) void mkHandleCrashException(NSException *exception,NSString *extraInfo); 17 | __attribute__((overloadable)) void mkHandleCrashException(NSString *exceptionMessage); 18 | __attribute__((overloadable)) void mkHandleCrashException(NSString *exceptionMessage,NSString *extraInfo); 19 | 20 | 21 | @interface MKException : NSObject 22 | 23 | @property(nonatomic,readwrite,weak) id delegate; 24 | 25 | @property(nonatomic,readwrite,assign) BOOL printLog; 26 | 27 | @property(nonatomic,readwrite,assign) MKCrashGuardType guardCrashType; 28 | 29 | + (instancetype)shareException; 30 | 31 | - (void)handleCrashInException:(nonnull NSException *)exceptionMessage extraInfo:(nullable NSString *)extraInfo; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKDebugTool.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #define kNotifyKeyReloadHttp @"kNotifyKeyReloadHttp" 12 | 13 | 14 | @protocol MKDebugDelegate 15 | - (NSData*)decryptJson:(NSData*)data; 16 | @end 17 | 18 | @interface MKDebugTool : NSObject 19 | 20 | /** 21 | * 主色调 22 | */ 23 | @property (nonatomic, copy) UIColor *mainColor; 24 | 25 | /** 26 | * 设置代理 27 | */ 28 | @property (nonatomic, weak) id delegate; 29 | 30 | /** 31 | * http请求数据是否加密,默认不加密 32 | */ 33 | @property (nonatomic, assign) BOOL isHttpRequestEncrypt; 34 | 35 | /** 36 | * http响应数据是否加密,默认不加密 37 | */ 38 | @property (nonatomic, assign) BOOL isHttpResponseEncrypt; 39 | 40 | /** 41 | * 日志最大数量,默认50条 42 | */ 43 | @property (nonatomic, assign) int maxLogsCount; 44 | 45 | /** 46 | * 设置只抓取的域名,忽略大小写,默认抓取所有 47 | */ 48 | @property (nonatomic, strong) NSArray *arrOnlyHosts; 49 | 50 | 51 | + (instancetype)shareInstance; 52 | /** 53 | * 启用 54 | */ 55 | - (void)enableDebugMode; 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKControlLoadingCircleView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/14. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface MKControlLoadingCircleView : UIView 11 | 12 | 13 | /** 绘制的方向:默认顺时针,YES:逆时针 */ 14 | @property (nonatomic, assign) BOOL clockwise; 15 | /** 外切圆半径 */ 16 | @property (nonatomic, assign) CGFloat outerRadius; 17 | /** 内切圆半径 */ 18 | @property (nonatomic, assign) CGFloat innerRadius; 19 | /** 起始角度,单位:角度,3点钟方向为0度,顺时针旋转计数,默认值360度 */ 20 | @property (nonatomic, assign) CGFloat beginAngle; 21 | /** 两个圆间距的角度,单位是角度,默认值3度 */ 22 | @property (nonatomic, assign) CGFloat gapAngle; 23 | 24 | /** 圆点填充色,默认为绿色 */ 25 | @property (nonatomic, strong) UIColor *progressColor; 26 | /** 圆点底色, 默认为无色 */ 27 | @property (nonatomic, strong) UIColor *trackColor; 28 | /** 圆点的数量,默认为50 */ 29 | @property (nonatomic, assign) NSUInteger dotCount; 30 | /** 进度最小数值,默认为0 */ 31 | @property (nonatomic, assign) CGFloat minValue; 32 | /** 进度最大数值,默认为100 */ 33 | @property (nonatomic, assign) CGFloat maxValue; 34 | 35 | /** 进度当前数值 */ 36 | @property (nonatomic, assign) CGFloat currentValue; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableAttributedString (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (instancetype)initWithString:(NSString *)str 17 | * - (instancetype)initWithString:(NSString *)str attributes:(NSDictionary *)attrs 18 | * - (void)addAttribute:(NSAttributedStringKey)name value:(id)value range:(NSRange)range; 19 | * - (void)addAttributes:(NSDictionary *)attrs range:(NSRange)range; 20 | * - (void)setAttributes:(nullable NSDictionary *)attrs range:(NSRange)range; 21 | * - (void)removeAttribute:(NSAttributedStringKey)name range:(NSRange)range; 22 | * - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; 23 | * - (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString; 24 | * - (void)deleteCharactersInRange:(NSRange)range; 25 | */ 26 | + (void)crashGuardExchangeMethod; 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | 31 | 32 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKControlLoadingCircleView.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/14. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface MKControlLoadingCircleView : UIView 11 | 12 | 13 | /** 绘制的方向:默认顺时针,YES:逆时针 */ 14 | @property (nonatomic, assign) BOOL clockwise; 15 | /** 外切圆半径 */ 16 | @property (nonatomic, assign) CGFloat outerRadius; 17 | /** 内切圆半径 */ 18 | @property (nonatomic, assign) CGFloat innerRadius; 19 | /** 起始角度,单位:角度,3点钟方向为0度,顺时针旋转计数,默认值360度 */ 20 | @property (nonatomic, assign) CGFloat beginAngle; 21 | /** 两个圆间距的角度,单位是角度,默认值3度 */ 22 | @property (nonatomic, assign) CGFloat gapAngle; 23 | 24 | /** 圆点填充色,默认为绿色 */ 25 | @property (nonatomic, strong) UIColor *progressColor; 26 | /** 圆点底色, 默认为无色 */ 27 | @property (nonatomic, strong) UIColor *trackColor; 28 | /** 圆点的数量,默认为50 */ 29 | @property (nonatomic, assign) NSUInteger dotCount; 30 | /** 进度最小数值,默认为0 */ 31 | @property (nonatomic, assign) CGFloat minValue; 32 | /** 进度最大数值,默认为100 */ 33 | @property (nonatomic, assign) CGFloat maxValue; 34 | 35 | /** 进度当前数值 */ 36 | @property (nonatomic, assign) CGFloat currentValue; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSMutableAttributedString (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (instancetype)initWithString:(NSString *)str 17 | * - (instancetype)initWithString:(NSString *)str attributes:(NSDictionary *)attrs 18 | * - (void)addAttribute:(NSAttributedStringKey)name value:(id)value range:(NSRange)range; 19 | * - (void)addAttributes:(NSDictionary *)attrs range:(NSRange)range; 20 | * - (void)setAttributes:(nullable NSDictionary *)attrs range:(NSRange)range; 21 | * - (void)removeAttribute:(NSAttributedStringKey)name range:(NSRange)range; 22 | * - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; 23 | * - (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString; 24 | * - (void)deleteCharactersInRange:(NSRange)range; 25 | */ 26 | + (void)crashGuardExchangeMethod; 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | 31 | 32 | -------------------------------------------------------------------------------- /MKAppKit/MKTool/MKFileUtils.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/05/29. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | */ 8 | 9 | 10 | 11 | #define MK_MAX_PATH_LENGTH 500 12 | 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface MKFileUtils : NSObject 18 | 19 | + (NSString *)documentsDirectoryPath; 20 | + (NSURL *)documentsDirectoryURL; 21 | + (NSString *)libraryDirectoryPath; 22 | + (NSString *)cacheDirectoryPath; 23 | + (NSString *)temporaryDirectoryPath; 24 | + (void)treeSanbox; 25 | + (void)saveToDir:(NSString*)dirPath content:(NSMutableDictionary *)dict fileName:(NSString*)fileName; 26 | /** 27 | NSlog printf 日志保存进沙盒 28 | @param savePath 保存的路径,可为空。将使用默认路径 29 | @return return 保存的路径 30 | */ 31 | + (NSString*)saveLogToLocalFile:(nullable NSString*)savePath; 32 | 33 | /** 34 | * 以一种安全的方式读取文件,基于底层api 35 | */ 36 | NSString* mk_safe_readFile(NSString *filePath); 37 | /** 38 | * 以一种安全的方式删除文件,基于底层api 39 | */ 40 | bool mk_safe_deletereFile(NSString *filePath); 41 | /** 42 | * 以一种安全的方式删除文件内容,基于底层api 43 | */ 44 | bool mk_safe_deleteContentsOfPath(NSString *filePath); 45 | /** 46 | * 文件是否存在,基于底层api 47 | */ 48 | bool mk_isFileExist(NSString *filePath); 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKControlLoadingCircleLayer.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/14. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | #import 8 | #import 9 | 10 | 11 | // 圆点进度条 内核 12 | @interface MKControlLoadingCircleLayer : CALayer 13 | 14 | /** 绘制的方向:默认顺时针,YES:逆时针 */ 15 | @property (nonatomic, assign) BOOL clockwise; 16 | /** 外切圆半径 */ 17 | @property (nonatomic, assign) CGFloat outerRadius; 18 | /** 内切圆半径 */ 19 | @property (nonatomic, assign) CGFloat innerRadius; 20 | /** 起始角度,单位:角度,3点钟方向为0度,顺时针旋转计数,默认值360度 */ 21 | @property (nonatomic, assign) CGFloat beginAngle; 22 | /** 两个圆间距的角度,单位是角度,默认值3度 */ 23 | @property (nonatomic, assign) CGFloat gapAngle; 24 | /** 圆点填充色,默认为绿色 */ 25 | @property (nonatomic, strong) UIColor *progressColor; 26 | /** 圆点底色, 默认为无色 */ 27 | @property (nonatomic, strong) UIColor *trackColor; 28 | /** 圆点的数量,默认为50 */ 29 | @property (nonatomic, assign) NSUInteger dotCount; 30 | /** 进度最小数值,默认为0 */ 31 | @property (nonatomic, assign) CGFloat minValue; 32 | /** 进度最大数值,默认为100 */ 33 | @property (nonatomic, assign) CGFloat maxValue; 34 | /** 进度当前数值 */ 35 | @property (nonatomic, assign) CGFloat currentValue; 36 | @end 37 | -------------------------------------------------------------------------------- /dev/DemoVC/UIKit/DropdownMailTFVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // DropdownMailTFVC.m 3 | // MKApp 4 | // 5 | // Created by https://github.com/mythkiven/ on 2019/4/28. 6 | // Copyright © 2019 MythKiven. All rights reserved. 7 | // 8 | 9 | #import "DropdownMailTFVC.h" 10 | #import "MKDropdownMailTF.h" 11 | @interface DropdownMailTFVC () 12 | @property (weak, nonatomic) IBOutlet UITextField *holderView; 13 | @end 14 | 15 | @implementation DropdownMailTFVC 16 | 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | self.holderView.hidden = YES; 21 | MKDropdownMailTF *textField = [[MKDropdownMailTF alloc] initWithFrame:self.holderView.frame super:self.view]; 22 | textField.placeholder = @"用户邮箱"; 23 | textField.backgroundColor = [UIColor whiteColor]; 24 | textField.borderStyle = UITextBorderStyleRoundedRect; 25 | 26 | //自定义 27 | textField.mailCellHeight = 40; 28 | textField.mailListHeight = 40*4; 29 | textField.mailFont = [UIFont systemFontOfSize:16]; 30 | textField.MailFontColor = [UIColor redColor]; 31 | textField.mailCellColor = [UIColor lightGrayColor]; 32 | textField.mailBgColor =[UIColor yellowColor]; 33 | textField.mailsuffixData = @[@"live.com", @"126.com", @"gmail.com",@"qq.com"]; 34 | 35 | [self.view addSubview:textField]; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKControlLoadingCircleLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKControlLoadingCircleLayer.h 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/14. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | #import 8 | #import 9 | 10 | 11 | // 圆点进度条 内核 12 | @interface MKControlLoadingCircleLayer : CALayer 13 | 14 | /** 绘制的方向:默认顺时针,YES:逆时针 */ 15 | @property (nonatomic, assign) BOOL clockwise; 16 | /** 外切圆半径 */ 17 | @property (nonatomic, assign) CGFloat outerRadius; 18 | /** 内切圆半径 */ 19 | @property (nonatomic, assign) CGFloat innerRadius; 20 | /** 起始角度,单位:角度,3点钟方向为0度,顺时针旋转计数,默认值360度 */ 21 | @property (nonatomic, assign) CGFloat beginAngle; 22 | /** 两个圆间距的角度,单位是角度,默认值3度 */ 23 | @property (nonatomic, assign) CGFloat gapAngle; 24 | /** 圆点填充色,默认为绿色 */ 25 | @property (nonatomic, strong) UIColor *progressColor; 26 | /** 圆点底色, 默认为无色 */ 27 | @property (nonatomic, strong) UIColor *trackColor; 28 | /** 圆点的数量,默认为50 */ 29 | @property (nonatomic, assign) NSUInteger dotCount; 30 | /** 进度最小数值,默认为0 */ 31 | @property (nonatomic, assign) CGFloat minValue; 32 | /** 进度最大数值,默认为100 */ 33 | @property (nonatomic, assign) CGFloat maxValue; 34 | /** 进度当前数值 */ 35 | @property (nonatomic, assign) CGFloat currentValue; 36 | @end 37 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKMonitor/MKDebug.m: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/05/29. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | */ 8 | 9 | 10 | #import "MKDebug.h" 11 | #import "MKFileUtils.h" 12 | #import "MKCrashMonitor.h" 13 | #import "MKSandbox.h" 14 | #import "MKFPSWatch.h" 15 | 16 | #import "MKDebugTool.h" 17 | 18 | @implementation MKDebug 19 | 20 | + (void)debugRegister{ 21 | // 日志保存 22 | // [MKFileUtils saveLogToLocalFile:nil]; 23 | // crash 抓取 24 | mk_registerCrashHandler(); 25 | // tree 26 | [MKFileUtils treeSanbox]; 27 | 28 | #if DEBUG 29 | [[MKDebugTool shareInstance] setMainColor:[UIColor redColor]]; 30 | [[MKDebugTool shareInstance] enableDebugMode]; 31 | #endif 32 | 33 | } 34 | + (void)enableDebug { 35 | 36 | #ifdef DEBUG 37 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 38 | [[MKSandbox sharedInstance] enableSwipe]; 39 | }); 40 | 41 | //#if !TARGET_IPHONE_SIMULATOR 42 | [MKFPSWatch sharedFPSCounter].enabled = YES; 43 | [MKFPSWatch sharedFPSCounter].recordRender = ^(NSDictionary * _Nonnull recordDic) { 44 | // NSLog(@"》》》%@",recordDic); 45 | }; 46 | //#endif 47 | 48 | 49 | #endif 50 | 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSwizzleHook.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | 12 | 13 | 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | 18 | typedef void (*MKSwizzleOriginalIMP)(void /* id, SEL, ... */ ); 19 | @interface MKSwizzleObject : NSObject 20 | - (MKSwizzleOriginalIMP)getOriginalImplementation; 21 | @property (nonatomic,readonly,assign) SEL selector; 22 | @end 23 | 24 | 25 | 26 | 27 | typedef id (^MKSwizzledIMPBlock)(MKSwizzleObject* swizzleInfo); 28 | void mk_swizzleClassMethod(Class cls, SEL originSelector, SEL swizzleSelector); 29 | void mk_swizzleInstanceMethod(Class cls, SEL originSelector, SEL swizzleSelector); 30 | void mk_swizzleKVODeallocIfNeeded(Class class); 31 | 32 | 33 | @interface NSObject (MKSwizzleHook) 34 | + (void)mk_swizzleClassMethod:(SEL)systemSelector withSwizzleMethod:(SEL)swizzleSelector; 35 | - (void)mk_swizzleInstanceMethod:(SEL)systemSelector withSwizzleMethod:(SEL)swizzleSelector; 36 | - (void)mk_swizzleInstanceMethod:(SEL)systemSelector withSwizzledBlock:(MKSwizzledIMPBlock)swizzledBlock; 37 | 38 | /** 39 | 在当前对象销毁时调用 40 | @param block 销毁时调用的 block 41 | */ 42 | - (void)mk_runAtDealloc:(void(^)(void))block; 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSAttributedString (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (instancetype)initWithString:(NSString *)str 17 | * - (instancetype)initWithAttributedString:(NSAttributedString *)attrStr 18 | * - (instancetype)initWithString:(NSString *)str attributes:(NSDictionary *)attrs 19 | * - (NSAttributedString *)attributedSubstringFromRange:(NSRange)range; 20 | * - (nullable id)attribute:(NSAttributedStringKey)attrName atIndex:(NSUInteger)location effectiveRange:(nullable NSRangePointer)range; 21 | * - (void)enumerateAttributesInRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(NSDictionary *attrs, NSRange range, BOOL *stop))block; 22 | * - (void)enumerateAttribute:(NSAttributedStringKey)attrName inRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(id _Nullable value, NSRange range, BOOL *stop))block; 23 | */ 24 | 25 | + (void)crashGuardExchangeMethod; 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | 30 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKSwizzleHook.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import 10 | 11 | 12 | 13 | 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | 18 | typedef void (*MKSwizzleOriginalIMP)(void /* id, SEL, ... */ ); 19 | @interface MKSwizzleObject : NSObject 20 | - (MKSwizzleOriginalIMP)getOriginalImplementation; 21 | @property (nonatomic,readonly,assign) SEL selector; 22 | @end 23 | 24 | 25 | 26 | 27 | typedef id (^MKSwizzledIMPBlock)(MKSwizzleObject* swizzleInfo); 28 | void mk_swizzleClassMethod(Class cls, SEL originSelector, SEL swizzleSelector); 29 | void mk_swizzleInstanceMethod(Class cls, SEL originSelector, SEL swizzleSelector); 30 | void mk_swizzleKVODeallocIfNeeded(Class class); 31 | 32 | 33 | @interface NSObject (MKSwizzleHook) 34 | + (void)mk_swizzleClassMethod:(SEL)systemSelector withSwizzleMethod:(SEL)swizzleSelector; 35 | - (void)mk_swizzleInstanceMethod:(SEL)systemSelector withSwizzleMethod:(SEL)swizzleSelector; 36 | - (void)mk_swizzleInstanceMethod:(SEL)systemSelector withSwizzledBlock:(MKSwizzledIMPBlock)swizzledBlock; 37 | 38 | /** 39 | 在当前对象销毁时调用 40 | @param block 销毁时调用的 block 41 | */ 42 | - (void)mk_runAtDealloc:(void(^)(void))block; 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MKAppKit 5 | 6 | MIT License 7 | 8 | Copyright (c) 2019 MYTHKIVEN 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | Generated by CocoaPods - https://cocoapods.org 28 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: objective-c 3 | osx_image: xcode10.2 # new in https://docs.travis-ci.com/user/reference/osx/ 4 | sudo: true 5 | 6 | env: 7 | global: 8 | - LC_CTYPE=en_US.UTF-8 9 | - LANG=en_US.UTF-8 10 | 11 | notifications: 12 | email: false 13 | 14 | addons: 15 | homebrew: 16 | packages: 17 | - curl # Fix the codecov upload issue 18 | 19 | cache: cocoapods 20 | podfile: MKAppDemo/Podfile 21 | 22 | before_install: 23 | - env 24 | - locale 25 | - gem install cocoapods --prerelease --no-document --quiet 26 | - gem install xcpretty --no-document --quiet 27 | - pod --version 28 | - pod repo update --silent 29 | - xcpretty --version 30 | - xcodebuild -version 31 | - xcodebuild -showsdks 32 | 33 | script: 34 | - set -o pipefail 35 | - echo Build the Demo apps 36 | - pod install --project-directory=MKAppDemo 37 | - cd MKAppDemo 38 | - xcodebuild build -workspace MKApp.xcworkspace -scheme 'MKApp' -configuration Debug -destination 'name=iPhone XS' | xcpretty -c 39 | - xcodebuild build -workspace MKApp.xcworkspace -scheme 'MKApp' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c 40 | - echo Clean DerivedData 41 | - rm -rf ~/Library/Developer/Xcode/DerivedData/ 42 | - mkdir DerivedData 43 | 44 | after_success: 45 | - bash <(curl -s https://codecov.io/bash) 46 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCell.m 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import "MKPushTableCell.h" 9 | @interface MKPushTableCell () 10 | @property (weak, nonatomic) IBOutlet UILabel *title; 11 | @property (weak, nonatomic) IBOutlet UIButton *btn; 12 | 13 | @end 14 | @implementation MKPushTableCell 15 | 16 | - (void)awakeFromNib { 17 | [super awakeFromNib]; 18 | } 19 | -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 20 | self = [super initWithStyle: style reuseIdentifier:reuseIdentifier]; 21 | if (self) { 22 | NSArray *nibArray = [[NSBundle mainBundle]loadNibNamed:@"MKPushTableCell" owner:nil options:nil]; 23 | self = [nibArray lastObject]; 24 | 25 | } 26 | return self; 27 | } 28 | 29 | -(void)setIndex:(NSInteger)index{ 30 | if (index ==99999) { 31 | self.title.hidden=YES; 32 | self.btn.hidden =YES; 33 | }else{ 34 | self.title.hidden=NO; 35 | self.btn.hidden =NO; 36 | self.title.text = [NSString stringWithFormat:@"成功加载数据,这是第%ld阶段",index]; 37 | } 38 | } 39 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 40 | [super setSelected:selected animated:animated]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTF.h: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Created by https://github.com/mythkiven/ on 15/11/12. 4 | // Copyright © 2015年 mythkiven All rights reserved. 5 | // 6 | 7 | #import 8 | 9 | @interface MKDropdownMailTF : UITextField 10 | 11 | /** 下拉提示的字符离左边的距离*/ 12 | @property (assign, nonatomic) CGFloat mLeftMargin; 13 | /** 下拉列表的frame,相对JPullEmailTF*/ 14 | @property (assign, nonatomic) CGRect mailListframe; 15 | /** 下拉列表的高度,默认4行cell高度 */ 16 | @property (assign, nonatomic) CGFloat mailListHeight; 17 | /** 下拉列表行高,默认44 */ 18 | @property (assign, nonatomic) CGFloat mailCellHeight; 19 | /** cell背景色*/ 20 | @property (nonatomic, strong) UIColor *mailCellColor; 21 | /** 下拉list背景色*/ 22 | @property (nonatomic, strong) UIColor *mailBgColor; 23 | /** 下拉list字体*/ 24 | @property (nonatomic, strong) UIFont *mailFont; 25 | /** 下拉list字体颜色*/ 26 | @property (nonatomic, strong) UIColor *MailFontColor; 27 | /** 下拉邮箱提示后缀数组, 如@[@"live.com", @"126.com", @"gmail.com"] */ 28 | @property (nonatomic, strong) NSArray *mailsuffixData; 29 | /** 设置下拉列表分割线的缩进, 传入一个参数数组[top, left, bottom, right], 分别是上左下右的缩进. 例如@[@1, @2, @3, @4]代表上左下右分别缩进1、2、3、4的距离*/ 30 | @property (nonatomic, strong) NSArray *separatorInsets; 31 | 32 | /** 隐藏下拉提示 */ 33 | - (void)hideEmailPrompt; 34 | 35 | /** 初始化JPullEmailTF */ 36 | - (instancetype)initWithFrame:(CGRect)frame super:(UIView *)view; 37 | 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSAttributedString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSAttributedString (MKCrashGuard) 13 | 14 | /** 防护: 15 | * 16 | * - (instancetype)initWithString:(NSString *)str 17 | * - (instancetype)initWithAttributedString:(NSAttributedString *)attrStr 18 | * - (instancetype)initWithString:(NSString *)str attributes:(NSDictionary *)attrs 19 | * - (NSAttributedString *)attributedSubstringFromRange:(NSRange)range; 20 | * - (nullable id)attribute:(NSAttributedStringKey)attrName atIndex:(NSUInteger)location effectiveRange:(nullable NSRangePointer)range; 21 | * - (void)enumerateAttributesInRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(NSDictionary *attrs, NSRange range, BOOL *stop))block; 22 | * - (void)enumerateAttribute:(NSAttributedStringKey)attrName inRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(id _Nullable value, NSRange range, BOOL *stop))block; 23 | */ 24 | 25 | + (void)crashGuardExchangeMethod; 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | 30 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCell.m 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import "MKPushTableCell.h" 9 | @interface MKPushTableCell () 10 | @property (weak, nonatomic) IBOutlet UILabel *title; 11 | @property (weak, nonatomic) IBOutlet UIButton *btn; 12 | 13 | @end 14 | @implementation MKPushTableCell 15 | 16 | - (void)awakeFromNib { 17 | [super awakeFromNib]; 18 | } 19 | -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 20 | self = [super initWithStyle: style reuseIdentifier:reuseIdentifier]; 21 | if (self) { 22 | NSArray *nibArray = [[NSBundle mainBundle]loadNibNamed:@"MKPushTableCell" owner:nil options:nil]; 23 | self = [nibArray lastObject]; 24 | 25 | } 26 | return self; 27 | } 28 | 29 | -(void)setIndex:(NSInteger)index{ 30 | if (index ==99999) { 31 | self.title.hidden=YES; 32 | self.btn.hidden =YES; 33 | }else{ 34 | self.title.hidden=NO; 35 | self.btn.hidden =NO; 36 | self.title.text = [NSString stringWithFormat:@"成功加载数据,这是第%ld阶段",index]; 37 | } 38 | } 39 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 40 | [super setSelected:selected animated:animated]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKUIKit/MKDropdownMailTF/MKDropdownMailTF.h: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Created by https://github.com/mythkiven/ on 15/11/12. 4 | // Copyright © 2015年 mythkiven All rights reserved. 5 | // 6 | 7 | #import 8 | 9 | @interface MKDropdownMailTF : UITextField 10 | 11 | /** 下拉提示的字符离左边的距离*/ 12 | @property (assign, nonatomic) CGFloat mLeftMargin; 13 | /** 下拉列表的frame,相对JPullEmailTF*/ 14 | @property (assign, nonatomic) CGRect mailListframe; 15 | /** 下拉列表的高度,默认4行cell高度 */ 16 | @property (assign, nonatomic) CGFloat mailListHeight; 17 | /** 下拉列表行高,默认44 */ 18 | @property (assign, nonatomic) CGFloat mailCellHeight; 19 | /** cell背景色*/ 20 | @property (nonatomic, strong) UIColor *mailCellColor; 21 | /** 下拉list背景色*/ 22 | @property (nonatomic, strong) UIColor *mailBgColor; 23 | /** 下拉list字体*/ 24 | @property (nonatomic, strong) UIFont *mailFont; 25 | /** 下拉list字体颜色*/ 26 | @property (nonatomic, strong) UIColor *MailFontColor; 27 | /** 下拉邮箱提示后缀数组, 如@[@"live.com", @"126.com", @"gmail.com"] */ 28 | @property (nonatomic, strong) NSArray *mailsuffixData; 29 | /** 设置下拉列表分割线的缩进, 传入一个参数数组[top, left, bottom, right], 分别是上左下右的缩进. 例如@[@1, @2, @3, @4]代表上左下右分别缩进1、2、3、4的距离*/ 30 | @property (nonatomic, strong) NSArray *separatorInsets; 31 | 32 | /** 隐藏下拉提示 */ 33 | - (void)hideEmailPrompt; 34 | 35 | /** 初始化JPullEmailTF */ 36 | - (instancetype)initWithFrame:(CGRect)frame super:(UIView *)view; 37 | 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSString (MKCrashGuard) 13 | 14 | /** 防护 15 | * 16 | * - (unichar)characterAtIndex:(NSUInteger)index 17 | * - (NSString *)substringFromIndex:(NSUInteger)from 18 | * - (NSString *)substringToIndex:(NSUInteger)to { 19 | * - (NSString *)substringWithRange:(NSRange)range { 20 | * - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement 21 | * - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange 22 | * - (NSString *)stringByReplacingCharactersInRange:(NSRange)range withString:(NSString *)replacement 23 | * + (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString; 24 | * + (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc; 25 | * - (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding; 26 | * - (instancetype)initWithString:(NSString *)aString; 27 | */ 28 | + (void)crashGuardExchangeMethod; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | 34 | 35 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKHttpDatasource.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | 11 | @interface MKHttpModel : NSObject 12 | @property (nonatomic,copy)NSString *requestId; 13 | @property (nonatomic,copy)NSURL *url; 14 | @property (nonatomic,copy)NSString *method; 15 | @property (nonatomic,copy)NSString *requestBody; 16 | @property (nonatomic,copy)NSString *statusCode; 17 | @property (nonatomic,copy)NSData *responseData; 18 | @property (nonatomic,assign)BOOL isImage; 19 | @property (nonatomic,copy)NSString *mineType; 20 | @property (nonatomic,copy)NSString *startTime; 21 | @property (nonatomic,copy)NSString *totalDuration; 22 | 23 | 24 | + (void)dealwithResponse:(NSData *)data resp:(NSURLResponse*)resp req:(NSURLRequest *)req; 25 | @end 26 | 27 | @interface MKHttpDatasource : NSObject 28 | 29 | @property (nonatomic,strong,readonly) NSMutableArray *httpArray; 30 | @property (nonatomic,strong,readonly) NSMutableArray *arrRequest; 31 | 32 | + (instancetype)shareInstance; 33 | /** 34 | * 记录http请求 35 | * 36 | * @param model http 37 | */ 38 | - (void)addHttpRequset:(MKHttpModel*)model; 39 | 40 | /** 41 | * 清空 42 | */ 43 | - (void)clear; 44 | 45 | /** 46 | * 解析 47 | */ 48 | + (NSString *)prettyJSONStringFromData:(NSData *)data; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSString+MKCrashGuard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSString (MKCrashGuard) 13 | 14 | /** 防护 15 | * 16 | * - (unichar)characterAtIndex:(NSUInteger)index 17 | * - (NSString *)substringFromIndex:(NSUInteger)from 18 | * - (NSString *)substringToIndex:(NSUInteger)to { 19 | * - (NSString *)substringWithRange:(NSRange)range { 20 | * - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement 21 | * - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange 22 | * - (NSString *)stringByReplacingCharactersInRange:(NSRange)range withString:(NSString *)replacement 23 | * + (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString; 24 | * + (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc; 25 | * - (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding; 26 | * - (instancetype)initWithString:(NSString *)aString; 27 | */ 28 | + (void)crashGuardExchangeMethod; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | 34 | 35 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKNetworkMonitor/MKHttpCell.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/07/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "MKHttpCell.h" 9 | #import "MKDebugTool.h" 10 | 11 | @interface MKHttpCell() 12 | 13 | @end 14 | 15 | @implementation MKHttpCell 16 | { 17 | UILabel *lblTitle; 18 | UILabel *lblValue; 19 | } 20 | 21 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 22 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 23 | if (self) { 24 | self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 25 | lblTitle = [[UILabel alloc] initWithFrame:CGRectMake(20, 10, [UIScreen mainScreen].bounds.size.width - 40, 20)]; 26 | lblTitle.textColor = [MKDebugTool shareInstance].mainColor; 27 | lblTitle.font = [UIFont fontWithName:@"Helvetica-Bold" size:19]; 28 | [self addSubview:lblTitle]; 29 | 30 | lblValue = [[UILabel alloc] initWithFrame:CGRectMake(20, 35, [UIScreen mainScreen].bounds.size.width - 40, 16)]; 31 | lblValue.textColor = [UIColor lightGrayColor]; 32 | lblValue.font = [UIFont systemFontOfSize:12]; 33 | [self addSubview:lblValue]; 34 | } 35 | return self; 36 | } 37 | 38 | - (void)setTitle:(NSString*)title value:(NSString*)value { 39 | lblTitle.text = title; 40 | lblValue.text = value; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /MKAppKit/0.0.3/MKAppKit.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "MKAppKit" 5 | s.version = "0.0.3" 6 | s.summary = "iOS常用组件" 7 | s.description = <<-DESC 8 | iOS常用组件 Desc 9 | DESC 10 | s.homepage = "https://github.com/mythkiven/MKAppKit" 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { "mythkiven" => "mythziven@gmail.com" } 13 | s.platform = :ios, "9.0" 14 | s.source = { :git => "https://github.com/mythkiven/MKAppKit", :tag => s.version.to_s } 15 | s.ios.deployment_target = '9.0' 16 | 17 | s.requires_arc = true 18 | s.default_subspec = 'All' 19 | s.swift_version = '5.0' 20 | 21 | s.subspec 'All' do |all| 22 | all.source_files = 'MKAppKit/MKAnimation/**/*.{h,m,swift}','MKAppKit/MKUIKit/**/*.{h,m,swift}' 23 | all.resources = "MKAppKit/**/**/*.{xib}" 24 | end 25 | 26 | s.subspec 'MKCombineLoadingAnimation' do |la| 27 | la.source_files = 'MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{h,m}' 28 | la.resources = "MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{xib}" 29 | end 30 | 31 | s.subspec 'MKDropdownMailTF' do |df| 32 | df.source_files = 'MKAppKit/MKUIKit/MKDropdownMailTF/*.{h,m}' 33 | df.resources = "MKAppKit/MKUIKit/MKDropdownMailTF/*.{xib}" 34 | end 35 | 36 | s.subspec 'MKDiffuseMenu' do |dm| 37 | dm.source_files = 'MKAppKit/MKAnimation/MKDiffuseMenu/*.{swift}' 38 | end 39 | 40 | end 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /MKAppKit/0.0.4/MKAppKit.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "MKAppKit" 5 | s.version = "0.0.4" 6 | s.summary = "iOS常用组件" 7 | s.description = <<-DESC 8 | iOS常用组件 Desc 9 | DESC 10 | s.homepage = "https://github.com/mythkiven/MKAppKit" 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { "mythkiven" => "mythziven@gmail.com" } 13 | s.platform = :ios, "9.0" 14 | s.source = { :git => "https://github.com/mythkiven/MKAppKit", :tag => s.version.to_s } 15 | s.ios.deployment_target = '9.0' 16 | 17 | s.requires_arc = true 18 | s.default_subspec = 'All' 19 | s.swift_version = '5.0' 20 | 21 | s.subspec 'All' do |all| 22 | all.source_files = 'MKAppKit/MKAnimation/**/*.{h,m,swift}','MKAppKit/MKUIKit/**/*.{h,m,swift}' 23 | all.resources = "MKAppKit/**/**/*.{xib}" 24 | end 25 | 26 | s.subspec 'MKCombineLoadingAnimation' do |la| 27 | la.source_files = 'MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{h,m}' 28 | la.resources = "MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{xib}" 29 | end 30 | 31 | s.subspec 'MKDropdownMailTF' do |df| 32 | df.source_files = 'MKAppKit/MKUIKit/MKDropdownMailTF/*.{h,m}' 33 | df.resources = "MKAppKit/MKUIKit/MKDropdownMailTF/*.{xib}" 34 | end 35 | 36 | s.subspec 'MKDiffuseMenu' do |dm| 37 | dm.source_files = 'MKAppKit/MKAnimation/MKDiffuseMenu/*.{swift}' 38 | end 39 | 40 | end 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSNumber+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+MKCrashGuard.m 3 | // MKAppKit 4 | // 5 | // Created by apple on 2019/6/14. 6 | // 7 | 8 | #import "NSNumber+MKCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | #import 12 | 13 | MK_SYNTH_DUMMY_CLASS(NSNumber_MKSELCrashGuard) 14 | @implementation NSNumber (MKCrashGuard) 15 | 16 | + (void)guardNSNumberCrash { 17 | // mk_swizzleInstanceMethod([self class],@selector(isEqualToNumber:),@selector(guard_isEqualToNumber:)); 18 | // mk_swizzleInstanceMethod([self class],@selector(compare:),@selector(guard_compare:)); 19 | } 20 | 21 | //- (BOOL)guard_isEqualToNumber:(NSNumber *)number { 22 | // if (!number) { 23 | // NSString *reason = [NSString stringWithFormat:@"[NSNumber %@ ] number can`t be nil",NSStringFromSelector(_cmd)]; 24 | // NSException *exception = [NSException exceptionWithName:reason reason:reason userInfo:nil]; 25 | // mkHandleCrashException(exception); 26 | // return NO; 27 | // } 28 | // return [self guard_isEqualToNumber:number]; 29 | //} 30 | // 31 | //- (NSComparisonResult)guard_compare:(NSNumber *)number { 32 | // if (!number) { 33 | // NSString *reason = [NSString stringWithFormat:@"[NSNumber %@ ] compare can`t be nil",NSStringFromSelector(_cmd)]; 34 | // NSException *exception = [NSException exceptionWithName:reason reason:reason userInfo:nil]; 35 | // mkHandleCrashException(exception); 36 | // return NSOrderedAscending; 37 | // } 38 | // return [self guard_compare:number]; 39 | //} 40 | @end 41 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSCache+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/13. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | 9 | #import "NSCache+MKCrashGuard.h" 10 | #import "MKException.h" 11 | #import "NSObject+MKSwizzleHook.h" 12 | #import 13 | 14 | MK_SYNTH_DUMMY_CLASS(NSCache_MKSELCrashGuard) 15 | @implementation NSCache (MKCrashGuard) 16 | 17 | 18 | + (void)guardNSCacheCrash { 19 | mk_swizzleInstanceMethod(NSClassFromString(@"NSCache"),@selector(setObject:forKey:),@selector(guard_setObject:forKey:)); 20 | mk_swizzleInstanceMethod(NSClassFromString(@"NSCache"),@selector(setObject:forKey:cost:),@selector(guard_setObject:forKey:cost:)); 21 | } 22 | 23 | - (void)guard_setObject:(id)obj forKey:(id)key { 24 | if(key&&obj){ 25 | [self guard_setObject:obj forKey:key]; 26 | }else{ 27 | NSString *reason=[NSString stringWithFormat:@"NSCache %@ key and value can`t be nil",NSStringFromSelector(_cmd)]; 28 | NSException *exception=[NSException exceptionWithName:reason reason:reason userInfo:nil]; 29 | mkHandleCrashException(exception); 30 | } 31 | } 32 | - (void)guard_setObject:(id)obj forKey:(id)key cost:(NSUInteger)g { 33 | if(key&&obj){ 34 | [self guard_setObject:obj forKey:key cost:g]; 35 | }else{ 36 | NSString *reason=[NSString stringWithFormat:@"NSCache %@ key and value can`t be nil",NSStringFromSelector(_cmd)]; 37 | NSException *exception=[NSException exceptionWithName:reason reason:reason userInfo:nil]; 38 | mkHandleCrashException(exception); 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /dev/MKApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | MKApp 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/MKAppKit/MKAppKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "MKControlLoadingCircleLayer.h" 14 | #import "MKControlLoadingCircleView.h" 15 | #import "MKDradualLoadingView.h" 16 | #import "MKLoadingManagerView.h" 17 | #import "MKPushTableCell.h" 18 | #import "MKPushTableCellView.h" 19 | #import "MKCrashGuardConst.h" 20 | #import "MKCrashGuardManager.h" 21 | #import "MKException.h" 22 | #import "NSArray+MKCrashGuard.h" 23 | #import "NSAttributedString+MKCrashGuard.h" 24 | #import "NSCache+MKCrashGuard.h" 25 | #import "NSDictionary+MKCrashGuard.h" 26 | #import "NSMutableArray+MKCrashGuard.h" 27 | #import "NSMutableAttributedString+MKCrashGuard.h" 28 | #import "NSMutableDictionary+MKCrashGuard.h" 29 | #import "NSMutableSet+MKCrashGuard.h" 30 | #import "NSMutableString+MKCrashGuard.h" 31 | #import "NSNull+MKCrashGuard.h" 32 | #import "NSNumber+MKCrashGuard.h" 33 | #import "NSObject+MKCrashGuard.h" 34 | #import "NSObject+MKKVCCrashGuard.h" 35 | #import "NSObject+MKKVOCrashGuard.h" 36 | #import "NSObject+MKNotificationCrashGuard.h" 37 | #import "NSObject+MKSELCrashGuard.h" 38 | #import "NSObject+MKSwizzleHook.h" 39 | #import "NSSet+MKCrashGuard.h" 40 | #import "NSString+MKCrashGuard.h" 41 | #import "NSTimer+MKCrashGuard.h" 42 | #import "NSUserDefaults+MKCrashGuard.h" 43 | #import "UINavigationController+MKCrashGuard.h" 44 | #import "MKDropdownMailTF.h" 45 | #import "MKDropdownMailTFCell.h" 46 | 47 | FOUNDATION_EXPORT double MKAppKitVersionNumber; 48 | FOUNDATION_EXPORT const unsigned char MKAppKitVersionString[]; 49 | 50 | -------------------------------------------------------------------------------- /MKAppKit/Resource/MKCLAResource.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | Root 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | Title 13 | Group 14 | 15 | 16 | Type 17 | PSTextFieldSpecifier 18 | Title 19 | Name 20 | Key 21 | name_preference 22 | DefaultValue 23 | 24 | IsSecure 25 | 26 | KeyboardType 27 | Alphabet 28 | AutocapitalizationType 29 | None 30 | AutocorrectionType 31 | No 32 | 33 | 34 | Type 35 | PSToggleSwitchSpecifier 36 | Title 37 | Enabled 38 | Key 39 | enabled_preference 40 | DefaultValue 41 | 42 | 43 | 44 | Type 45 | PSSliderSpecifier 46 | Key 47 | slider_preference 48 | DefaultValue 49 | 0.5 50 | MinimumValue 51 | 0 52 | MaximumValue 53 | 1 54 | MinimumValueImage 55 | 56 | MaximumValueImage 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKLaunchMonitor/MKPointWatch.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/05/13. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | * 打点的时间误差在 0.0003s以内 8 | */ 9 | 10 | 11 | #import 12 | 13 | typedef NS_ENUM(NSInteger, BLStopwatchSplitType) { 14 | MKPointWatchTypeSection = 1, // 分段记录 15 | MKPointWatchTypeContinuous // 连续记录 16 | }; 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | @interface MKPointWatch : NSObject 21 | 22 | + (instancetype)pointWatch; 23 | 24 | /** 25 | * 记录的所有点 26 | */ 27 | @property (nonatomic,copy, readonly) NSArray *> *points; 28 | /** 29 | * 当次打点的时长 30 | */ 31 | @property (nonatomic,assign, readonly) NSTimeInterval lastWatchInterval; 32 | /** 33 | * 格式化后的打点字符串 34 | */ 35 | @property (nonatomic,copy, readonly) NSString* printedPoints; 36 | 37 | /** 38 | * 简单计时开始 39 | */ 40 | + (void)timeBegin; 41 | /** 42 | * 简单计时结束 43 | */ 44 | + (CFTimeInterval)timeEnd; 45 | /** 46 | * 简单计时结束 47 | * @param type 记录的类型. 48 | */ 49 | + (CFTimeInterval)timeEndWithType:(BLStopwatchSplitType)type; 50 | 51 | /** 52 | * 开始打点 53 | */ 54 | - (void)startWatching; 55 | /** 56 | * 结束打点 57 | */ 58 | - (void)stopWatching; 59 | /** 60 | * 结束打点,并alert打点结果 61 | */ 62 | - (void)stopWatchingAndAlertResult; 63 | /** 64 | * 重置打点 65 | */ 66 | - (void)resetWatching; 67 | /** 68 | * 打点(使用缺省值:记录中间值) 69 | * @param description 打点描述 70 | */ 71 | - (void)pointWithDescription:(NSString * _Nullable)description; 72 | /** 73 | * 打点(自定义打点类型) 74 | * @param type 记录的类型. 75 | * @param description 描述信息. 76 | */ 77 | - (void)pointWithType:(BLStopwatchSplitType)type description:(NSString * _Nullable)description; 78 | 79 | @end 80 | 81 | NS_ASSUME_NONNULL_END 82 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/Resource/MKCLAResource.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | Root 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | Title 13 | Group 14 | 15 | 16 | Type 17 | PSTextFieldSpecifier 18 | Title 19 | Name 20 | Key 21 | name_preference 22 | DefaultValue 23 | 24 | IsSecure 25 | 26 | KeyboardType 27 | Alphabet 28 | AutocapitalizationType 29 | None 30 | AutocorrectionType 31 | No 32 | 33 | 34 | Type 35 | PSToggleSwitchSpecifier 36 | Title 37 | Enabled 38 | Key 39 | enabled_preference 40 | DefaultValue 41 | 42 | 43 | 44 | Type 45 | PSSliderSpecifier 46 | Key 47 | slider_preference 48 | DefaultValue 49 | 0.5 50 | MinimumValue 51 | 0 52 | MaximumValue 53 | 1 54 | MinimumValueImage 55 | 56 | MaximumValueImage 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /MKAppKit/MKTool/MKDevice.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 4 | * Created by https://github.com/mythkiven/ on 19/06/28. 5 | * Copyright © 2019年 mythkiven. All rights reserved. 6 | * 7 | */ 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MKDevice : NSObject 14 | @property (copy,nonatomic) NSString * appName; 15 | @property (copy,nonatomic) NSString * appVersion; 16 | @property (copy,nonatomic) NSString * appBundleVersion; 17 | 18 | @property (copy,nonatomic) NSString * deviceName; 19 | @property (copy,nonatomic) NSString * deviceModel; 20 | @property (copy,nonatomic) NSString * deviceVersion; 21 | @property (copy,nonatomic) NSString * deviceLanguage; 22 | 23 | /** 屏幕显示的电量,低电量时才能检测出来 */ 24 | @property (copy,nonatomic) NSString * batteryPercent; 25 | /** 屏幕显示的网络情况 26 | eg: netName:中国联通 netType:WIFI netStrength:[raw:0dBm bars:1] wifiStrength:[raw:-54dBm bars:3] 当前网络为: 联通+wifi 27 | eg: netName:中国联通 netType:4G netStrength:[raw:0dBm bars:1] wifiStrength:[raw:0dBm bars:0] 当前网络为: 联通 28 | eg: netName:中国联通 netType:WIFI netStrength:[raw:0dBm bars:1] wifiStrength:[raw:-47dBm bars:3] 当前网络为: wifi 29 | eg: netName:无 SIM 卡 netType:WIFI netStrength:[raw: bars:] wifiStrength:[raw:-49dBm bars:3] 当前网络为: 无SIM卡+wifi 30 | bars: 标识信号强度 3: 强 ,2:中, 1:弱 ,无 31 | */ 32 | @property (copy,nonatomic) NSString * netInfo; 33 | /** 屏幕显示的时间 */ 34 | @property (copy,nonatomic) NSString * currentTime; 35 | /** 2:已越狱*/ 36 | @property (assign,nonatomic) int jailBreak; 37 | 38 | @property (copy,nonatomic) NSString * cpuType; 39 | @property (copy,nonatomic) NSString * appUsedMemory; 40 | @property (copy,nonatomic) NSString * totalMemory; 41 | @property (copy,nonatomic) NSString * totalDisk; 42 | @property (copy,nonatomic) NSString * freeDisk; 43 | @property (copy,nonatomic) NSString * cpuUsed; 44 | 45 | @property (copy,nonatomic) NSString * deviceInfo; 46 | @end 47 | 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /dev/MKApp/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSMutableDictionary+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSMutableDictionary+MKCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | 12 | MK_SYNTH_DUMMY_CLASS(NSMutableDictionary_MKCrashGuard) 13 | @implementation NSMutableDictionary (MKCrashGuard) 14 | 15 | #pragma mark MKCrashGuardProtocol 16 | + (void)crashGuardExchangeMethod { 17 | mk_swizzleInstanceMethod(NSClassFromString(@"__NSDictionaryM"), @selector(setObject:forKey:), @selector(guardSetObject:forKey:)); 18 | mk_swizzleInstanceMethod(NSClassFromString(@"__NSDictionaryM"), @selector(removeObjectForKey:), @selector(guardRemoveObjectForKey:)); 19 | mk_swizzleInstanceMethod(NSClassFromString(@"__NSDictionaryM"), @selector(setObject:forKeyedSubscript:), @selector(guardSetObject:forKeyedSubscript:)); 20 | } 21 | 22 | - (void) guardSetObject:(id)object forKey:(id)key { 23 | if (object && key) { 24 | [self guardSetObject:object forKey:key]; 25 | } else { 26 | mkHandleCrashException([NSString stringWithFormat:@"[NSMutableDictionary setObject: forKey: ] invalid object:%@ and key:%@ dict:%@",object,key,self]); 27 | } 28 | } 29 | 30 | - (void) guardRemoveObjectForKey:(id)key { 31 | if (key) { 32 | [self guardRemoveObjectForKey:key]; 33 | } else { 34 | mkHandleCrashException([NSString stringWithFormat:@"[NSMutableDictionary removeObjectForKey: ] nil key dict:%@",self]); 35 | } 36 | } 37 | 38 | - (void) guardSetObject:(id)object forKeyedSubscript:(id)key { 39 | if (key) { 40 | [self guardSetObject:object forKeyedSubscript:key]; 41 | } else { 42 | mkHandleCrashException([NSString stringWithFormat:@"[NSMutableDictionary setObject: forKeyedSubscript: ] object:%@ and forKeyedSubscript:%@ dict:%@",object,key,self]); 43 | } 44 | } 45 | 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSMutableDictionary+MKCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/05/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSMutableDictionary+MKCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | 12 | MK_SYNTH_DUMMY_CLASS(NSMutableDictionary_MKCrashGuard) 13 | @implementation NSMutableDictionary (MKCrashGuard) 14 | 15 | #pragma mark MKCrashGuardProtocol 16 | + (void)crashGuardExchangeMethod { 17 | mk_swizzleInstanceMethod(NSClassFromString(@"__NSDictionaryM"), @selector(setObject:forKey:), @selector(guardSetObject:forKey:)); 18 | mk_swizzleInstanceMethod(NSClassFromString(@"__NSDictionaryM"), @selector(removeObjectForKey:), @selector(guardRemoveObjectForKey:)); 19 | mk_swizzleInstanceMethod(NSClassFromString(@"__NSDictionaryM"), @selector(setObject:forKeyedSubscript:), @selector(guardSetObject:forKeyedSubscript:)); 20 | } 21 | 22 | - (void) guardSetObject:(id)object forKey:(id)key { 23 | if (object && key) { 24 | [self guardSetObject:object forKey:key]; 25 | } else { 26 | mkHandleCrashException([NSString stringWithFormat:@"[NSMutableDictionary setObject: forKey: ] invalid object:%@ and key:%@ dict:%@",object,key,self]); 27 | } 28 | } 29 | 30 | - (void) guardRemoveObjectForKey:(id)key { 31 | if (key) { 32 | [self guardRemoveObjectForKey:key]; 33 | } else { 34 | mkHandleCrashException([NSString stringWithFormat:@"[NSMutableDictionary removeObjectForKey: ] nil key dict:%@",self]); 35 | } 36 | } 37 | 38 | - (void) guardSetObject:(id)object forKeyedSubscript:(id)key { 39 | if (key) { 40 | [self guardSetObject:object forKeyedSubscript:key]; 41 | } else { 42 | mkHandleCrashException([NSString stringWithFormat:@"[NSMutableDictionary setObject: forKeyedSubscript: ] object:%@ and forKeyedSubscript:%@ dict:%@",object,key,self]); 43 | } 44 | } 45 | 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /MKAppKit/MKFoundation/MKJSON.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/04/29. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MKJSON : NSObject 13 | 14 | /** 15 | * 初始化的 JSON 对象 16 | */ 17 | @property (nonatomic, copy, readonly, nullable) id JSONObject; 18 | /** 19 | * 实例的 NSDictionary 形式 20 | */ 21 | @property (nonatomic, copy, readonly, nullable) NSDictionary* dictionary; 22 | /** 23 | * 实例的 NSArray 形式 24 | */ 25 | @property (nonatomic, copy, readonly, nullable) NSArray* array; 26 | /** 27 | * 实例的 NSString 形式 28 | */ 29 | @property (nonatomic, copy, readonly, nullable) NSString* string; 30 | /** 31 | * 实例的 NSNumber 形式 32 | */ 33 | @property (nonatomic, copy, readonly, nullable) NSNumber* number; 34 | /** 35 | * 实例的 NSDecimalNumber 形式 36 | */ 37 | @property (nonatomic, copy, readonly, nullable) NSDecimalNumber* decimalNumber; 38 | /** 39 | * 实例的 NSInteger 形式 40 | */ 41 | @property (nonatomic, readonly) NSInteger integerValue; 42 | /** 43 | * 实例的 NSInteger 形式 44 | */ 45 | @property (nonatomic, readonly) double doubleValue; 46 | /** 47 | * 实例的 NSInteger 形式 48 | */ 49 | @property (nonatomic, readonly) float floatValue; 50 | /** 51 | * 实例的 NSInteger 形式 52 | */ 53 | @property (nonatomic, readonly) int intValue; 54 | /** 55 | * 实例的 NSInteger 形式 56 | */ 57 | @property (nonatomic, readonly) BOOL boolValue; 58 | /** 59 | * 实例的 int (64bit) 形式 60 | */ 61 | @property (nonatomic, readonly) int64_t longLongValue; 62 | /** 63 | * 创建一个 MKJSON 实例 64 | * @param JSONObject 一个有效的 json 对象 65 | * @return MKJSON 实例 66 | */ 67 | - (instancetype)initWithJSONObject:(nullable id)JSONObject; 68 | - (nullable instancetype)objectForKeyedSubscript:(NSString *)key; 69 | @end 70 | 71 | /** 72 | * 简化的实例方法 73 | * @param 等同 -[MKJSON initWithJSONObject:] 74 | * @return 等同 -[MKJSON initWithJSONObject:] 75 | */ 76 | MKJSON *MKMakeJSON(id _Nullable JSONObject); 77 | 78 | 79 | NS_ASSUME_NONNULL_END 80 | -------------------------------------------------------------------------------- /dev/MKApp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ![](https://api.travis-ci.org/mythkiven/MKAppKit.svg?branch=master) 5 | [![Version](https://img.shields.io/cocoapods/v/MKAppKit.svg?style=flat)](http://cocoapods.org/pods/MKAppKit) 6 | [![License](https://img.shields.io/apm/l/vim-mode.svg)](http://cocoapods.org/pods/MKAppKit) 7 | [![Platform](https://img.shields.io/cocoapods/p/MKAppKit.svg?style=flat)](http://cocoapods.org/pods/MKAppKit) 8 | 9 | 10 | ![](./source/icon_MKAppKit.png) 11 | 12 | 13 | ## Crash 守护组件 14 | 15 | | 组件 | 添加方式 | 语言 | 备注 | 16 | | --- | --- | --- | --- | 17 | | [crash 防护组件 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKCrashGuard.md) | `pod 'MKAppKit/MKCrashGuard' ` | Objective-C | 守护类型:KVO、KVC、unrecognized selector、NStimer、NSNotification、UINavigationController、NSString,NSArray,NSDictonary,NSAttributedString,NSSet 以及对应的可变形式 18 | 19 | ## 性能监控组件 20 | 21 | | 组件 | 添加方式 | 语言 | 备注 | 22 | | --- | --- | --- | --- | 23 | | [启动监控组件 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKMonitor.md) | `pod 'MKAppKit/MKLaunchMonitor' ` | Objective-C | 包含代码打点工具等 24 | | 陆续添加中.. | | | 25 | 26 | 27 | 28 | ## 动画组件 29 | 30 | | 组件 | 添加方式 | 语言 | 效果 | 31 | | --- | --- | --- | --- | 32 | | [圆环进度 + tableview 组合的加载数据动画 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKCombineLoadingAnimation.md) | `pod 'MKAppKit/MKCombineLoadingAnimation' ` | Objective-C | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKCombineLoadingAnimation.gif) 33 | | [MKDiffuseMenu: 点击散开的动画效果 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKDiffuseMenu.md) | `pod 'MKAppKit/MKDiffuseMenu' ` | swift5.0 | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKDiffuseMenu.gif) 34 | | | | | 35 | 36 | 37 | 38 | ## UI 组件 39 | | 组件 | 添加方式 | 语言 | 效果 | 40 | | --- | --- | --- | --- | 41 | | [输入 @自动下拉邮箱列表 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKDropdownMailTF.md) | `pod 'MKAppKit/MKDropdownMailTF' ` | Objective-C | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKDropdownMailTF.gif) 42 | | | | | 43 | 44 | 45 | 46 | **使用** 47 | 48 | ``` 49 | 添加 pod 时,如遇到错误:Unable to find a specification for `MKAppKit` 50 | 请更新 repo: 51 | $ pod repo update 52 | ``` 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ![](https://api.travis-ci.org/mythkiven/MKAppKit.svg?branch=master) 5 | [![Version](https://img.shields.io/cocoapods/v/MKAppKit.svg?style=flat)](http://cocoapods.org/pods/MKAppKit) 6 | [![License](https://img.shields.io/apm/l/vim-mode.svg)](http://cocoapods.org/pods/MKAppKit) 7 | [![Platform](https://img.shields.io/cocoapods/p/MKAppKit.svg?style=flat)](http://cocoapods.org/pods/MKAppKit) 8 | 9 | 10 | ![](./source/icon_MKAppKit.png) 11 | 12 | 13 | ## Crash 守护组件:MKCrashGuard 14 | 15 | | 组件 | 添加方式 | 语言 | 备注 | 16 | | --- | --- | --- | --- | 17 | | [crash 防护组件 v1.1](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKCrashGuard.md) | `pod 'MKAppKit/MKCrashGuard' ` | Objective-C | 守护类型:KVO、KVC、unrecognized selector、NStimer、NSNotification、UINavigationController、NSUserDefaults、NSCache、以及:NSString,NSArray,NSDictonary,NSAttributedString,NSSet 和对应的 5 种可变容器类型 18 | | 守护的范围持续更新中.. | | | 19 | 20 | ## 性能监控组件: MKMonitor 系列 21 | 22 | | 组件 | 添加方式 | 语言 | 备注 | 23 | | --- | --- | --- | --- | 24 | | [启动监控组件 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKMonitor.md) | `pod 'MKAppKit/MKLaunchMonitor' ` | Objective-C | 包含代码打点工具等 25 | | 其他性能组件陆续添加中.. | | | 26 | 27 | 28 | 29 | ## UI 组件 30 | 31 | | 组件 | 添加方式 | 语言 | 效果 | 32 | | --- | --- | --- | --- | 33 | | [圆环进度 + tableview 组合的加载数据动画 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKCombineLoadingAnimation.md) | `pod 'MKAppKit/MKCombineLoadingAnimation' ` | Objective-C | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKCombineLoadingAnimation.gif) 34 | | [MKDiffuseMenu: 点击散开的动画效果 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKDiffuseMenu.md) | `pod 'MKAppKit/MKDiffuseMenu' ` | swift5.0 | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKDiffuseMenu.gif) 35 | | [输入 @ 自动下拉邮箱列表 v1.0](https://github.com/mythkiven/MKAppKit/blob/master/doc/MKDropdownMailTF.md) | `pod 'MKAppKit/MKDropdownMailTF' ` | Objective-C | ![](https://github.com/mythkiven/MKAppKit/blob/master/source/MKDropdownMailTF.gif) 36 | | UI 还是以前的版本,暂无更新计划 | | | 37 | 38 | 39 | 40 | **使用** 41 | 42 | ``` 43 | 添加 pod 时,如遇到错误:Unable to find a specification for `MKAppKit` 44 | 请更新 repo: 45 | $ pod repo update 46 | ``` 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /MKAppKit.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "MKAppKit" 5 | s.version = "0.1.1" 6 | s.summary = "Useful tools for iOS application development." 7 | s.description = <<-DESC 8 | iOS 常用组件 Desc 9 | DESC 10 | s.homepage = "https://github.com/mythkiven/MKAppKit" 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { "mythkiven" => "1282412855@qq.com" } 13 | s.platform = :ios, "9.0" 14 | s.source = { :git => "https://github.com/mythkiven/MKAppKit", :tag => s.version.to_s } 15 | s.ios.deployment_target = '9.0' 16 | 17 | s.requires_arc = true 18 | s.default_subspec = 'All' 19 | s.swift_version = '5.0' 20 | 21 | s.subspec 'All' do |all| 22 | all.source_files = 'MKAppKit/**/**/*.{h,m,swift,mm,c}' 23 | all.resources = "MKAppKit/**/**/*.{xib}","MKAppKit/Resource/*.{bundle}" 24 | all.prefix_header_contents = '#import "MKLoadingManagerView.h"','#import "MKDropdownMailTF.h"','#import "MKPointWatch.h"','#import "MKCrashGuardManager.h"' 25 | end 26 | 27 | s.subspec 'MKCombineLoadingAnimation' do |la| 28 | la.source_files = 'MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{h,m}' 29 | la.resources = "MKAppKit/Resource/*.{bundle}","MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{xib}" 30 | la.prefix_header_contents = '#import "MKLoadingManagerView.h"' 31 | end 32 | 33 | s.subspec 'MKDropdownMailTF' do |df| 34 | df.source_files = 'MKAppKit/MKUIKit/MKDropdownMailTF/*.{h,m}' 35 | df.resources = "MKAppKit/MKUIKit/MKDropdownMailTF/*.{xib}" 36 | df.prefix_header_contents = '#import "MKDropdownMailTF.h"' 37 | end 38 | 39 | s.subspec 'MKDiffuseMenu' do |dm| 40 | dm.source_files = 'MKAppKit/MKAnimation/MKDiffuseMenu/*.{swift}' 41 | end 42 | 43 | s.subspec 'MKLaunchMonitor' do |lm| 44 | lm.source_files = 'MKAppKit/MKMonitor/MKLaunchMonitor/*.{h,m,c,mm}' 45 | lm.prefix_header_contents = '#import "MKPointWatch.h"' 46 | end 47 | 48 | s.subspec 'MKCrashGuard' do |cg| 49 | cg.source_files = 'MKAppKit/MKCrash/MKCrashGuard/*.{h,m,c,mm}' 50 | cg.prefix_header_contents = '#import "MKCrashGuardManager.h"' 51 | end 52 | 53 | end 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSString+MKCategory.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSString+MKCategory.h" 9 | 10 | @implementation NSString (MKCategory) 11 | 12 | #pragma mark 拼音 13 | 14 | - (NSString *)mk_pinyin 15 | { 16 | return [self mk_pinyinWithTone:NO]; 17 | } 18 | 19 | - (NSString *)mk_pinyinAndTone 20 | { 21 | return [self mk_pinyinWithTone:YES]; 22 | } 23 | 24 | - (NSString *)mk_pinyinWithTone:(BOOL)tone 25 | { 26 | NSMutableString *string = [self mutableCopy]; 27 | CFStringTransform((__bridge CFMutableStringRef)string,NULL,kCFStringTransformMandarinLatin,NO); 28 | if (!tone) 29 | { 30 | CFStringTransform((__bridge CFMutableStringRef)string,NULL,kCFStringTransformStripDiacritics,NO); 31 | } 32 | return [[NSString alloc] initWithString:string]; 33 | } 34 | 35 | #pragma mark SIZE 36 | 37 | + (NSString *)mk_stringFromFileSize:(uint64_t)byteCount 38 | { 39 | return [self mk_stringFromSize:byteCount delimiter:@" " diskMode:NO significant:3]; 40 | } 41 | 42 | + (NSString *)mk_stringFromDiskSize:(uint64_t)byteCount 43 | { 44 | return [self mk_stringFromSize:byteCount delimiter:@" " diskMode:YES significant:3]; 45 | } 46 | 47 | + (NSString *)mk_stringFromSize:(uint64_t)byteCount delimiter:(NSString *)delimiter diskMode:(BOOL)diskMode significant:(uint8_t)length 48 | { 49 | const NSString* sizeUnit[] = {@"B",@"KB",@"MB",@"GB",@"TB",@"PB",@"EB",@"ZB",@"YB"}; 50 | 51 | NSInteger idx = 0; 52 | double floatSize = byteCount; 53 | while (floatSize>1000 && idx < (sizeof(sizeUnit)/sizeof(sizeUnit[0])-1)) 54 | { 55 | idx++; 56 | if (diskMode) 57 | floatSize /= 1000; 58 | else 59 | floatSize /= 1024; 60 | } 61 | 62 | if (idx == 0) 63 | { 64 | return [NSString stringWithFormat:@"%.0f%@%@",floatSize,delimiter?delimiter:@"",sizeUnit[idx]]; 65 | }else 66 | { 67 | NSString *formatString = [NSString stringWithFormat:@"%%.%df%%@%%@",MAX((int)length - ((int)log10(floatSize) + 1), 0)]; 68 | return [NSString stringWithFormat:formatString,floatSize,delimiter?delimiter:@"",sizeUnit[idx]]; 69 | } 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCellView.m 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import "MKPushTableCell.h" 9 | #import "MKPushTableCellView.h" 10 | @interface MKPushTableCellView () 11 | 12 | @end 13 | 14 | @implementation MKPushTableCellView 15 | 16 | -(instancetype)initWithFrame:(CGRect)frame{ 17 | if (self = [super initWithFrame:frame]) { 18 | 19 | [self initDefaultWithFrame:frame]; 20 | } 21 | return self; 22 | } 23 | 24 | -(void)initDefaultWithFrame:(CGRect)frame{ 25 | 26 | self.tableCellView = [[UITableView alloc]initWithFrame:frame style:UITableViewStylePlain]; 27 | self.tableCellView.separatorStyle = UITableViewCellSeparatorStyleNone; 28 | self.tableCellView.showsVerticalScrollIndicator = NO; 29 | self.tableCellView.showsHorizontalScrollIndicator =NO; 30 | self.tableCellView.rowHeight =30; 31 | self.tableCellView.backgroundColor =[UIColor lightGrayColor]; 32 | [self.tableCellView registerNib:[UINib nibWithNibName:@"MKPushTableCell" bundle:nil] forCellReuseIdentifier:@"MKPushTableCell"]; 33 | 34 | self.tableCellView.delegate =self; 35 | self.tableCellView.dataSource =self; 36 | self.userInteractionEnabled =NO; 37 | [self addSubview:self.tableCellView]; 38 | } 39 | -(void)setIndex:(NSInteger)index{ 40 | _index = index; 41 | [self.tableCellView reloadData]; 42 | [self.tableCellView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; 43 | } 44 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 45 | return _data.count; 46 | } 47 | -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 48 | MKPushTableCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MKPushTableCell" forIndexPath:indexPath]; 49 | if ([_data[indexPath.row] isEqualToString:@"NULL"]) { 50 | cell.index = 99999; 51 | }else{ 52 | cell.index = [_data[indexPath.row] integerValue] ; 53 | } 54 | return cell; 55 | } 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKAnimation/MKCombineLoadingAnimation/MKPushTableCellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKPushTableCellView.m 3 | // 4 | // Created by https://github.com/mythkiven/ on 15/01/17. 5 | // Copyright © 2015年 mythkiven. All rights reserved. 6 | // 7 | 8 | #import "MKPushTableCell.h" 9 | #import "MKPushTableCellView.h" 10 | @interface MKPushTableCellView () 11 | 12 | @end 13 | 14 | @implementation MKPushTableCellView 15 | 16 | -(instancetype)initWithFrame:(CGRect)frame{ 17 | if (self = [super initWithFrame:frame]) { 18 | 19 | [self initDefaultWithFrame:frame]; 20 | } 21 | return self; 22 | } 23 | 24 | -(void)initDefaultWithFrame:(CGRect)frame{ 25 | 26 | self.tableCellView = [[UITableView alloc]initWithFrame:frame style:UITableViewStylePlain]; 27 | self.tableCellView.separatorStyle = UITableViewCellSeparatorStyleNone; 28 | self.tableCellView.showsVerticalScrollIndicator = NO; 29 | self.tableCellView.showsHorizontalScrollIndicator =NO; 30 | self.tableCellView.rowHeight =30; 31 | self.tableCellView.backgroundColor =[UIColor lightGrayColor]; 32 | [self.tableCellView registerNib:[UINib nibWithNibName:@"MKPushTableCell" bundle:nil] forCellReuseIdentifier:@"MKPushTableCell"]; 33 | 34 | self.tableCellView.delegate =self; 35 | self.tableCellView.dataSource =self; 36 | self.userInteractionEnabled =NO; 37 | [self addSubview:self.tableCellView]; 38 | } 39 | -(void)setIndex:(NSInteger)index{ 40 | _index = index; 41 | [self.tableCellView reloadData]; 42 | [self.tableCellView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; 43 | } 44 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 45 | return _data.count; 46 | } 47 | -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 48 | MKPushTableCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MKPushTableCell" forIndexPath:indexPath]; 49 | if ([_data[indexPath.row] isEqualToString:@"NULL"]) { 50 | cell.index = 99999; 51 | }else{ 52 | cell.index = [_data[indexPath.row] integerValue] ; 53 | } 54 | return cell; 55 | } 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /MKAppKit/MKCategory/NSData+MKCategory.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/08/01. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSData+MKCategory.h" 9 | 10 | @implementation NSData (MKCategory) 11 | 12 | - (NSData *)mk_UTF8Data 13 | { 14 | //保存结果 15 | NSMutableData *resData = [[NSMutableData alloc] initWithCapacity:self.length]; 16 | 17 | //无效编码替代符号(常见 � □ ?) 18 | NSData *replacement = [@"�" dataUsingEncoding:NSUTF8StringEncoding]; 19 | 20 | uint64_t index = 0; 21 | const uint8_t *bytes = self.bytes; 22 | 23 | while (index < self.length) 24 | { 25 | uint8_t len = 0; 26 | uint8_t header = bytes[index]; 27 | 28 | //单字节 29 | if ((header&0x80) == 0) 30 | { 31 | len = 1; 32 | } 33 | //2字节(并且不能为C0,C1) 34 | else if ((header&0xE0) == 0xC0) 35 | { 36 | if (header != 0xC0 && header != 0xC1) 37 | { 38 | len = 2; 39 | } 40 | } 41 | //3字节 42 | else if((header&0xF0) == 0xE0) 43 | { 44 | len = 3; 45 | } 46 | //4字节(并且不能为F5,F6,F7) 47 | else if ((header&0xF8) == 0xF0) 48 | { 49 | if (header != 0xF5 && header != 0xF6 && header != 0xF7) 50 | { 51 | len = 4; 52 | } 53 | } 54 | 55 | //无法识别 56 | if (len == 0) 57 | { 58 | [resData appendData:replacement]; 59 | index++; 60 | continue; 61 | } 62 | 63 | //检测有效的数据长度(后面还有多少个10xxxxxx这样的字节) 64 | uint8_t validLen = 1; 65 | while (validLen < len && index+validLen < self.length) 66 | { 67 | if ((bytes[index+validLen] & 0xC0) != 0x80) 68 | break; 69 | validLen++; 70 | } 71 | 72 | //有效字节等于编码要求的字节数表示合法,否则不合法 73 | if (validLen == len) 74 | { 75 | [resData appendBytes:bytes+index length:len]; 76 | }else 77 | { 78 | [resData appendData:replacement]; 79 | } 80 | 81 | //移动下标 82 | index += validLen; 83 | } 84 | 85 | return resData; 86 | } 87 | 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVCCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSObject+MKKVCCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | #import 12 | 13 | 14 | MK_SYNTH_DUMMY_CLASS(NSObject_MKKVCCrashGuard) 15 | @implementation NSObject (MKKVCCrashGuard) 16 | 17 | 18 | + (void)guardKVCCrash { 19 | 20 | mk_swizzleInstanceMethod([self class], @selector(setValue:forKey:),@selector(crashGuardSetValue:forKey:)); 21 | mk_swizzleInstanceMethod([self class], @selector(setValue:forKeyPath:),@selector(crashGuardSetValue:forKeyPath:)); 22 | mk_swizzleInstanceMethod([self class], @selector(setValue:forUndefinedKey:),@selector(crashGuardSetValue:forUndefinedKey:)); 23 | mk_swizzleInstanceMethod([self class], @selector(setValuesForKeysWithDictionary:),@selector(crashGuardSetValuesForKeysWithDictionary:)); 24 | 25 | } 26 | 27 | - (void)crashGuardSetValue:(id)value forKey:(NSString *)key { 28 | @try { 29 | [self crashGuardSetValue:value forKey:key]; 30 | } 31 | @catch (NSException *exception) { 32 | mkHandleCrashException(exception); 33 | } 34 | @finally { 35 | 36 | } 37 | } 38 | 39 | - (void)crashGuardSetValue:(id)value forKeyPath:(NSString *)keyPath { 40 | @try { 41 | [self crashGuardSetValue:value forKeyPath:keyPath]; 42 | } 43 | @catch (NSException *exception) { 44 | mkHandleCrashException(exception); 45 | } 46 | @finally { 47 | 48 | } 49 | } 50 | 51 | - (void)crashGuardSetValue:(id)value forUndefinedKey:(NSString *)key { 52 | @try { 53 | [self crashGuardSetValue:value forUndefinedKey:key]; 54 | } 55 | @catch (NSException *exception) { 56 | mkHandleCrashException(exception); 57 | } 58 | @finally { 59 | 60 | } 61 | } 62 | 63 | 64 | - (void)crashGuardSetValuesForKeysWithDictionary:(NSDictionary *)keyedValues { 65 | @try { 66 | [self crashGuardSetValuesForKeysWithDictionary:keyedValues]; 67 | } 68 | @catch (NSException *exception) { 69 | mkHandleCrashException(exception); 70 | } 71 | @finally { 72 | 73 | } 74 | } 75 | 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /dev/Pods/Local Podspecs/MKAppKit.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MKAppKit", 3 | "version": "0.1.1", 4 | "summary": "Useful tools for iOS application development.", 5 | "description": "iOS 常用组件 Desc", 6 | "homepage": "https://github.com/mythkiven/MKAppKit", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "mythkiven": "1282412855@qq.com" 13 | }, 14 | "platforms": { 15 | "ios": "9.0" 16 | }, 17 | "source": { 18 | "git": "https://github.com/mythkiven/MKAppKit", 19 | "tag": "0.1.1" 20 | }, 21 | "requires_arc": true, 22 | "default_subspecs": "All", 23 | "swift_versions": "5.0", 24 | "subspecs": [ 25 | { 26 | "name": "All", 27 | "source_files": "MKAppKit/**/**/*.{h,m,swift,mm,c}", 28 | "resources": [ 29 | "MKAppKit/**/**/*.{xib}", 30 | "MKAppKit/Resource/*.{bundle}" 31 | ], 32 | "prefix_header_contents": [ 33 | "#import \"MKLoadingManagerView.h\"", 34 | "#import \"MKDropdownMailTF.h\"", 35 | "#import \"MKPointWatch.h\"", 36 | "#import \"MKCrashGuardManager.h\"" 37 | ] 38 | }, 39 | { 40 | "name": "MKCombineLoadingAnimation", 41 | "source_files": "MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{h,m}", 42 | "resources": [ 43 | "MKAppKit/Resource/*.{bundle}", 44 | "MKAppKit/MKAnimation/MKCombineLoadingAnimation/*.{xib}" 45 | ], 46 | "prefix_header_contents": "#import \"MKLoadingManagerView.h\"" 47 | }, 48 | { 49 | "name": "MKDropdownMailTF", 50 | "source_files": "MKAppKit/MKUIKit/MKDropdownMailTF/*.{h,m}", 51 | "resources": "MKAppKit/MKUIKit/MKDropdownMailTF/*.{xib}", 52 | "prefix_header_contents": "#import \"MKDropdownMailTF.h\"" 53 | }, 54 | { 55 | "name": "MKDiffuseMenu", 56 | "source_files": "MKAppKit/MKAnimation/MKDiffuseMenu/*.{swift}" 57 | }, 58 | { 59 | "name": "MKLaunchMonitor", 60 | "source_files": "MKAppKit/MKMonitor/MKLaunchMonitor/*.{h,m,c,mm}", 61 | "prefix_header_contents": "#import \"MKPointWatch.h\"" 62 | }, 63 | { 64 | "name": "MKCrashGuard", 65 | "source_files": "MKAppKit/MKCrash/MKCrashGuard/*.{h,m,c,mm}", 66 | "prefix_header_contents": "#import \"MKCrashGuardManager.h\"" 67 | } 68 | ], 69 | "swift_version": "5.0" 70 | } 71 | -------------------------------------------------------------------------------- /dev/Pods/MKAppKit/MKAppKit/MKCrash/MKCrashGuard/NSObject+MKKVCCrashGuard.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/11. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSObject+MKKVCCrashGuard.h" 9 | #import "MKException.h" 10 | #import "NSObject+MKSwizzleHook.h" 11 | #import 12 | 13 | 14 | MK_SYNTH_DUMMY_CLASS(NSObject_MKKVCCrashGuard) 15 | @implementation NSObject (MKKVCCrashGuard) 16 | 17 | 18 | + (void)guardKVCCrash { 19 | 20 | mk_swizzleInstanceMethod([self class], @selector(setValue:forKey:),@selector(crashGuardSetValue:forKey:)); 21 | mk_swizzleInstanceMethod([self class], @selector(setValue:forKeyPath:),@selector(crashGuardSetValue:forKeyPath:)); 22 | mk_swizzleInstanceMethod([self class], @selector(setValue:forUndefinedKey:),@selector(crashGuardSetValue:forUndefinedKey:)); 23 | mk_swizzleInstanceMethod([self class], @selector(setValuesForKeysWithDictionary:),@selector(crashGuardSetValuesForKeysWithDictionary:)); 24 | 25 | } 26 | 27 | - (void)crashGuardSetValue:(id)value forKey:(NSString *)key { 28 | @try { 29 | [self crashGuardSetValue:value forKey:key]; 30 | } 31 | @catch (NSException *exception) { 32 | mkHandleCrashException(exception); 33 | } 34 | @finally { 35 | 36 | } 37 | } 38 | 39 | - (void)crashGuardSetValue:(id)value forKeyPath:(NSString *)keyPath { 40 | @try { 41 | [self crashGuardSetValue:value forKeyPath:keyPath]; 42 | } 43 | @catch (NSException *exception) { 44 | mkHandleCrashException(exception); 45 | } 46 | @finally { 47 | 48 | } 49 | } 50 | 51 | - (void)crashGuardSetValue:(id)value forUndefinedKey:(NSString *)key { 52 | @try { 53 | [self crashGuardSetValue:value forUndefinedKey:key]; 54 | } 55 | @catch (NSException *exception) { 56 | mkHandleCrashException(exception); 57 | } 58 | @finally { 59 | 60 | } 61 | } 62 | 63 | 64 | - (void)crashGuardSetValuesForKeysWithDictionary:(NSDictionary *)keyedValues { 65 | @try { 66 | [self crashGuardSetValuesForKeysWithDictionary:keyedValues]; 67 | } 68 | @catch (NSException *exception) { 69 | mkHandleCrashException(exception); 70 | } 71 | @finally { 72 | 73 | } 74 | } 75 | 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /doc/MKMonitor.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ### MKMonitor 性能监控包含如下几部分 6 | 7 | - MKEnergyMonitor:电量监控 8 | - MKNetworkMonitor:网络流量监控 9 | - MKRenderMonitor:渲染帧率监控 10 | - MKCPUMonitor:CPU 监控 11 | - MKMemoryMonitor:内存监控 12 | - MKCrashMonitor:卡顿监控 13 | - MKLaunchMonitor:app 启动监控 14 | - MKCrashMonitor:crash 监控 15 | 16 | 17 | ### 性能监控途径 18 | 19 | - 1、Xcode 自带的 Instrument 20 | 21 | Xcode 自带的 Instrument 工具包含了很多强大的检测 功能:CPU、内存、磁盘、网络、卡顿、耗电等等,开发过程中可以使用这些工具辅助调试 App。 22 | 23 | - 2、使用三方 SDK。 24 | 25 | 一些三方 SDK,像听云,OneAPM,Bugly 等利用 swizzle 方法进行 AOP 处理,在关键函数之前和之后自动埋点记录上报。使用起来会比较方便,最大的缺点就是安全性,这些 SDK 统计到的数据可能就是商业机密,并且也不清楚有没有统计其他信息。所以最好的方式就是自己实现相关的监控功能。 26 | 27 | 28 | ### 1、启动监控: MKLaunchMonitor 29 | ![](../source/appLaunch.png) 30 | 31 | 启动分冷启动和热启动,热启动是 App 从 Background 到 Active,这个我们不关心,冷启动才是目前需要测量的重要数据。 32 | 33 | 冷启动分为两阶段: pre-main 阶段 (点击图标 ->main) 和 main 阶段 (main->applicationDidBecomeActive)。 34 | 35 | ###### pre-main 阶段 36 | 37 | pre main() 这个时间, 一般控制在 400ms 以内。iOS10 之后,可以在 Xcode 的 Edit Scheme->Run->Environment Variables 中增加 `DYLD_PRINT_STATISTICS` 环境变量, value=1 来测量这个时间。当前工具库暂时没发监控这个数据。 38 | 39 | 40 | ###### main()->applicationDidBecomeActive() 41 | 这个时间我这里定义是: main() 的第一行代码到 applicationDidBecomeActive() 最后一行代码。可以使用代码打点 (`MKAppKit/MKLaunchMonitor/MKPointWatch`) 的方式直接记录这个时间。 42 | 43 | 44 | ### 2、CUP 监控:MKCPUMonitor 45 | 46 | 47 | 48 | 49 | sss、、 50 | 51 | 52 | 53 | 主线程阻塞超过 400 毫秒就会让用户感知到卡顿 54 | 55 | 参考: 56 | 57 | - iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理 https://github.com/aozhimin/iOS-Monitor-Platform 58 | - https://www.itslide.com/slide/275520/ 59 | 60 | 61 | 62 | 流量监控去掉 NSURLProtocol 对于 WKWebView 的支持, 因为出于性能的原因,post 请求 body 数据被清空 (encode 的时候 HTTPBody 和 HTTPBodyStream 这两个字段被丢弃掉了)。参考苹果源码 https://github.com/WebKit/webkit/blob/fe39539b83d28751e86077b173abd5b7872ce3f9/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm#L61-L88 。及 bug report: https://bugs.webkit.org/show_bug.cgi?id=138169。 from https://mp.weixin.qq.com/s/rhYKLIbXOsUJC_n6dt9UfA 63 | ### 相关工具 64 | 65 | - [检测项目中未使用的图片](https://github.com/tinymind/LSUnusedResources) 66 | - [检测项目中未使用的类](https://github.com/dblock/fui) 67 | 68 | ** 参考 ** 69 | - [dyld 与 ObjC](https://blog.cnbluebox.com/blog/2017/06/20/dyldyu-objc/) 70 | - [WWDC2016 Optimizing App Startup Time](https://developer.apple.com/videos/play/wwdc2016/406/) 71 | - [WWDC2017 App Startup Time: Past, Present, and Future](https://developer.apple.com/videos/play/wwdc2017/413) -------------------------------------------------------------------------------- /MKAppKit/MKMonitor/MKLaunchMonitor/NSObject+MKTTimeLoad.m: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Created by https://github.com/mythkiven/ on 19/06/21. 4 | * Copyright © 2019年 mythkiven. All rights reserved. 5 | * 6 | */ 7 | 8 | #import "NSObject+MKTTimeLoad.h" 9 | #import "NSObject+MKSwizzleHook.h" 10 | 11 | #import 12 | #import 13 | #import 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #define TIMESTAMP_NUMBER(interval) [NSNumber numberWithLongLong:interval*1000*1000] 20 | 21 | unsigned int count; 22 | const char **classes; 23 | 24 | @implementation NSObject (MKTTimeLoad) 25 | + (void)load { 26 | 27 | _loadInfoArray = [[NSMutableArray alloc] init]; 28 | CFAbsoluteTime time1 = CFAbsoluteTimeGetCurrent(); 29 | int imageCount = (int)_dyld_image_count(); 30 | for(int iImg = 0; iImg < imageCount; iImg++) { 31 | const char* path = _dyld_get_image_name((unsigned)iImg); 32 | NSString *imagePath = [NSString stringWithUTF8String:path]; 33 | 34 | NSBundle* mainBundle = [NSBundle mainBundle]; 35 | NSString* bundlePath = [mainBundle bundlePath]; 36 | if ([imagePath containsString:bundlePath] && ![imagePath containsString:@".dylib"]) { 37 | classes = objc_copyClassNamesForImage(path, &count); 38 | for (int i = 0; i < count; i++) { 39 | NSString *className = [NSString stringWithCString:classes[i] encoding:NSUTF8StringEncoding]; 40 | if (![className isEqualToString:@""] && className) { 41 | mk_swizzleClassMethod([self class], @selector(load), @selector(mk_Load)); 42 | } 43 | } 44 | } 45 | } 46 | CFAbsoluteTime time2 = CFAbsoluteTimeGetCurrent(); 47 | NSLog(@"MK>> Hook Time:%f",(time2 - time1) * 1000); 48 | } 49 | 50 | + (void)mk_Load { 51 | CFAbsoluteTime start = CFAbsoluteTimeGetCurrent(); 52 | [self mk_Load]; 53 | CFAbsoluteTime end = CFAbsoluteTimeGetCurrent(); 54 | // 时间精度 us 55 | NSDictionary *infoDic = @{@"st":TIMESTAMP_NUMBER(start), 56 | @"et":TIMESTAMP_NUMBER(end), 57 | @"name":NSStringFromClass([self class]) 58 | }; 59 | [_loadInfoArray addObject:infoDic]; 60 | } 61 | 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /dev/Pods/Target Support Files/Pods-MKApp/Pods-MKApp-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2019 MYTHKIVEN 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | License 39 | MIT 40 | Title 41 | MKAppKit 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | Generated by CocoaPods - https://cocoapods.org 48 | Title 49 | 50 | Type 51 | PSGroupSpecifier 52 | 53 | 54 | StringsTable 55 | Acknowledgements 56 | Title 57 | Acknowledgements 58 | 59 | 60 | --------------------------------------------------------------------------------