├── .gitignore
├── AddingTheSignInWithAppleFlowToYourApp
├── .DS_Store
├── Configuration
│ └── SampleCode.xcconfig
├── Juice.xcodeproj
│ ├── .xcodesamplecode.plist
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Juice.xcscheme
├── Juice
│ ├── .DS_Store
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ └── Main.storyboard
│ ├── Juice.entitlements
│ ├── LoginViewController.swift
│ ├── ResultViewController.swift
│ └── Supporting Files
│ │ ├── .DS_Store
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ │ ├── Info.plist
│ │ └── KeychainItem.swift
├── LICENSE
│ └── LICENSE.txt
└── README.md
├── LICENSE
├── QQ交流群.png
├── README.md
├── VideoEncoder&Decoder.zip
├── iOS_Tips
├── .DS_Store
├── DarkMode.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── DarkMode.xcscheme
├── DarkMode
│ ├── .DS_Store
│ ├── AVFoundation
│ │ ├── ColorPicker
│ │ │ ├── SLColorPickerViewController.h
│ │ │ └── SLColorPickerViewController.m
│ │ ├── FaceDetect
│ │ │ ├── SLFaceDetectController.h
│ │ │ └── SLFaceDetectController.m
│ │ ├── Filter
│ │ │ ├── SLFilterViewController.h
│ │ │ └── SLFilterViewController.m
│ │ ├── GPUImageDemo
│ │ │ └── Controller
│ │ │ │ ├── SLGPUImageController.h
│ │ │ │ ├── SLGPUImageController.m
│ │ │ │ ├── SLWaterMarkController.h
│ │ │ │ └── SLWaterMarkController.m
│ │ ├── SLAVListViewController.h
│ │ ├── SLAVListViewController.m
│ │ └── SmallVideo
│ │ │ ├── .DS_Store
│ │ │ ├── Controller
│ │ │ ├── .DS_Store
│ │ │ ├── SLEditImageController.h
│ │ │ ├── SLEditImageController.m
│ │ │ ├── SLEditVideoController.h
│ │ │ ├── SLEditVideoController.m
│ │ │ ├── SLImageClipController.h
│ │ │ ├── SLImageClipController.m
│ │ │ ├── SLShotViewController.h
│ │ │ └── SLShotViewController.m
│ │ │ └── View
│ │ │ ├── SLDrawView.h
│ │ │ ├── SLDrawView.m
│ │ │ ├── SLEditMenuView.h
│ │ │ ├── SLEditMenuView.m
│ │ │ ├── SLEditSelectedBox.h
│ │ │ ├── SLEditSelectedBox.m
│ │ │ ├── SLEditTextView.h
│ │ │ ├── SLEditTextView.m
│ │ │ ├── SLEditVideoClipping.h
│ │ │ ├── SLEditVideoClipping.m
│ │ │ ├── SLGridView.h
│ │ │ ├── SLGridView.m
│ │ │ ├── SLImageZoomView.h
│ │ │ ├── SLImageZoomView.m
│ │ │ ├── SLMosaicView.h
│ │ │ ├── SLMosaicView.m
│ │ │ ├── SLShotFocusView.h
│ │ │ └── SLShotFocusView.m
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ ├── .DS_Store
│ │ ├── AppIcon.appiconset
│ │ │ ├── 120-1.png
│ │ │ ├── 120.png
│ │ │ ├── 180.png
│ │ │ ├── 20.png
│ │ │ ├── 29.png
│ │ │ ├── 40-1.png
│ │ │ ├── 40.png
│ │ │ ├── 58-1.png
│ │ │ ├── 58.png
│ │ │ ├── 60.png
│ │ │ ├── 80-1.png
│ │ │ ├── 80.png
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── SmallVideo
│ │ │ ├── Contents.json
│ │ │ ├── EditBrushMosaic.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditBrushMosaic@2x.png
│ │ │ │ └── EditBrushMosaic@3x.png
│ │ │ ├── EditBrushMosaicSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditBrushMosaicSelected@2x.png
│ │ │ │ └── EditBrushMosaicSelected@3x.png
│ │ │ ├── EditImageClipCancel.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditImageClipCancel@2x.png
│ │ │ │ └── EditImageClipCancel@3x.png
│ │ │ ├── EditImageClipDone.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditImageClipDone@2x.png
│ │ │ │ └── EditImageClipDone@3x.png
│ │ │ ├── EditMenuClipImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuClipImage@2x.png
│ │ │ │ └── EditMenuClipImage@3x.png
│ │ │ ├── EditMenuCut.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuCut@2x.png
│ │ │ │ └── EditMenuCut@3x.png
│ │ │ ├── EditMenuCutSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuCutSelected@2x.png
│ │ │ │ └── EditMenuCutSelected@3x.png
│ │ │ ├── EditMenuGraffiti.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuGraffiti@2x.png
│ │ │ │ └── EditMenuGraffiti@3x.png
│ │ │ ├── EditMenuGraffitiBack.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuGraffitiBack@2x.png
│ │ │ │ └── EditMenuGraffitiBack@3x.png
│ │ │ ├── EditMenuGraffitiSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuGraffitiSelected@2x.png
│ │ │ │ └── EditMenuGraffitiSelected@3x.png
│ │ │ ├── EditMenuMosaic.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuMosaic@2x.png
│ │ │ │ └── EditMenuMosaic@3x.png
│ │ │ ├── EditMenuMosaicSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuMosaicSelected@2x.png
│ │ │ │ └── EditMenuMosaicSelected@3x.png
│ │ │ ├── EditMenuSticker.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuSticker@2x.png
│ │ │ │ └── EditMenuSticker@3x.png
│ │ │ ├── EditMenuStickerSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuStickerSelected@2x.png
│ │ │ │ └── EditMenuStickerSelected@3x.png
│ │ │ ├── EditMenuText.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuText@2x.png
│ │ │ │ └── EditMenuText@3x.png
│ │ │ ├── EditMenuTextBackgroundColor.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuTextBackgroundColor@2x.png
│ │ │ │ └── EditMenuTextBackgroundColor@3x.png
│ │ │ ├── EditMenuTextColor.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuText@2x.png
│ │ │ │ └── EditMenuText@3x.png
│ │ │ ├── EditMenuTextSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMenuTextSelected@2x.png
│ │ │ │ └── EditMenuTextSelected@3x.png
│ │ │ ├── EditMosaicBrush.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditMosaicBrush@2x.png
│ │ │ │ └── EditMosaicBrush@3x.png
│ │ │ ├── EditTraditionalMosaic.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditTraditionalMosaic@2x.png
│ │ │ │ └── EditTraditionalMosaic@3x.png
│ │ │ ├── EditTraditionalMosaicSelected.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── EditTraditionalMosaicSelected@2x.png
│ │ │ │ └── EditTraditionalMosaicSelected@3x.png
│ │ │ ├── back.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── back@2x.png
│ │ │ │ └── back@3x.png
│ │ │ ├── cameraAround.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── record_video_camera@2x.png
│ │ │ │ └── record_video_camera@3x.png
│ │ │ ├── cancle.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── cancle@2x.png
│ │ │ │ └── cancle@3x.png
│ │ │ ├── edit.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── edit@2x.png
│ │ │ │ └── edit@3x.png
│ │ │ └── save.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── save@2x.png
│ │ │ │ └── save@3x.png
│ │ ├── apple.imageset
│ │ │ ├── Contents.json
│ │ │ ├── apple@2x-1.png
│ │ │ ├── apple@2x.png
│ │ │ ├── apple@3x-1.png
│ │ │ └── apple@3x.png
│ │ ├── face.imageset
│ │ │ ├── Contents.json
│ │ │ ├── face@2x.png
│ │ │ └── face@3x.png
│ │ ├── nav_return_white.imageset
│ │ │ ├── Contents.json
│ │ │ ├── nav_return_white@2x.png
│ │ │ └── nav_return_white@3x.png
│ │ └── play.imageset
│ │ │ ├── Contents.json
│ │ │ └── play.png
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Crash
│ │ ├── .DS_Store
│ │ ├── SLCrashProtector
│ │ │ ├── NSArray+SLCrashProtector.h
│ │ │ ├── NSArray+SLCrashProtector.m
│ │ │ ├── NSDictionary+SLCrashProtector.h
│ │ │ ├── NSDictionary+SLCrashProtector.m
│ │ │ ├── NSMutableArray+SLCrashProtector.h
│ │ │ ├── NSMutableArray+SLCrashProtector.m
│ │ │ ├── NSMutableDictionary+SLCrashProtector.h
│ │ │ ├── NSMutableDictionary+SLCrashProtector.m
│ │ │ ├── NSMutableString+SLCrashProtector.h
│ │ │ ├── NSMutableString+SLCrashProtector.m
│ │ │ ├── NSObject+SLCrashProtector.h
│ │ │ ├── NSObject+SLCrashProtector.m
│ │ │ ├── NSObject+SLMLeakFinder.h
│ │ │ ├── NSObject+SLMLeakFinder.m
│ │ │ ├── NSString+SLCrashProtector.h
│ │ │ ├── NSString+SLCrashProtector.m
│ │ │ ├── SLCrashHandler.h
│ │ │ ├── SLCrashHandler.m
│ │ │ ├── SLCrashProtector.h
│ │ │ ├── SLKVODelegate.h
│ │ │ ├── SLKVODelegate.m
│ │ │ ├── SLZombieCatcher.h
│ │ │ ├── SLZombieCatcher.m
│ │ │ ├── SLZombieFinder.h
│ │ │ ├── SLZombieFinder.m
│ │ │ ├── SLZombieSafeFree.h
│ │ │ ├── SLZombieSafeFree.m
│ │ │ ├── UINavigationController+SLMLeakFinder.h
│ │ │ ├── UINavigationController+SLMLeakFinder.m
│ │ │ ├── UIView+SLAsynUpdateUI.h
│ │ │ ├── UIView+SLAsynUpdateUI.m
│ │ │ ├── UIView+SLMLeakFinder.h
│ │ │ ├── UIView+SLMLeakFinder.m
│ │ │ ├── UIViewController+SLMLeakFinder.h
│ │ │ └── UIViewController+SLMLeakFinder.m
│ │ ├── SLCrashViewController.h
│ │ └── SLCrashViewController.m
│ ├── Dark
│ │ ├── SLDarkModeViewController.h
│ │ ├── SLDarkModeViewController.m
│ │ └── SLDarkModeViewController.xib
│ ├── General
│ │ ├── .DS_Store
│ │ ├── AV
│ │ │ ├── .DS_Store
│ │ │ ├── SLAvCaptureSession.h
│ │ │ ├── SLAvCaptureSession.m
│ │ │ ├── SLAvCaptureTool.h
│ │ │ ├── SLAvCaptureTool.m
│ │ │ ├── SLAvEditExport.h
│ │ │ ├── SLAvEditExport.m
│ │ │ ├── SLAvPlayer.h
│ │ │ ├── SLAvPlayer.m
│ │ │ ├── SLAvWriterInput.h
│ │ │ └── SLAvWriterInput.m
│ │ ├── SLAnimateImageView
│ │ │ ├── SLImage.h
│ │ │ ├── SLImage.m
│ │ │ ├── SLImageDecoder.h
│ │ │ ├── SLImageDecoder.m
│ │ │ ├── SLImageView.h
│ │ │ ├── SLImageView.m
│ │ │ └── WebP.framework
│ │ │ │ ├── Headers
│ │ │ │ ├── config.h
│ │ │ │ ├── decode.h
│ │ │ │ ├── demux.h
│ │ │ │ ├── encode.h
│ │ │ │ ├── extras.h
│ │ │ │ ├── format_constants.h
│ │ │ │ ├── mux.h
│ │ │ │ ├── mux_types.h
│ │ │ │ └── types.h
│ │ │ │ └── WebP
│ │ ├── SLAvCaptureTool-bug副本.h
│ │ ├── SLAvCaptureTool-bug副本.m
│ │ ├── Tool
│ │ │ ├── .DS_Store
│ │ │ ├── HMLog.h
│ │ │ ├── PrefixHeader.pch
│ │ │ ├── SLDelayPerform.h
│ │ │ ├── SLDelayPerform.m
│ │ │ ├── SLKeyChain.h
│ │ │ ├── SLKeyChain.m
│ │ │ ├── SLMethod.h
│ │ │ ├── SLMethod.m
│ │ │ ├── SLNavigationController.h
│ │ │ ├── SLNavigationController.m
│ │ │ ├── SLProxy.h
│ │ │ ├── SLProxy.m
│ │ │ ├── SLTimer.h
│ │ │ ├── SLTimer.m
│ │ │ ├── SLToolMacro.h
│ │ │ ├── SLViewController.h
│ │ │ └── SLViewController.m
│ │ └── UI
│ │ │ ├── SLAlertView.h
│ │ │ ├── SLAlertView.m
│ │ │ ├── SLBlurView.h
│ │ │ ├── SLBlurView.m
│ │ │ ├── SLButton.h
│ │ │ ├── SLButton.m
│ │ │ ├── SLPaddingLabel.h
│ │ │ └── SLPaddingLabel.m
│ ├── Info.plist
│ ├── OpenGL
│ │ ├── .DS_Store
│ │ ├── Controller
│ │ │ ├── SLCubeViewController.h
│ │ │ ├── SLCubeViewController.m
│ │ │ ├── SLGLKPyramidVC.h
│ │ │ ├── SLGLKPyramidVC.m
│ │ │ ├── SLLoadImageVC.h
│ │ │ ├── SLLoadImageVC.m
│ │ │ ├── SLMixColorTextureVC.h
│ │ │ ├── SLMixColorTextureVC.m
│ │ │ ├── SLOpenGLController.h
│ │ │ ├── SLOpenGLController.m
│ │ │ ├── SLShaderCubeViewController.h
│ │ │ ├── SLShaderCubeViewController.m
│ │ │ ├── SLShaderFilterViewController.h
│ │ │ ├── SLShaderFilterViewController.m
│ │ │ ├── SLShaderLanguageViewController.h
│ │ │ ├── SLShaderLanguageViewController.m
│ │ │ ├── SLSpecialEffectsViewController.h
│ │ │ ├── SLSpecialEffectsViewController.m
│ │ │ ├── SLSplitScreenViewController.h
│ │ │ └── SLSplitScreenViewController.m
│ │ ├── ShaderLanguage
│ │ │ ├── Cirlce.fsh
│ │ │ ├── Cirlce.vsh
│ │ │ ├── Glitch.fsh
│ │ │ ├── Glitch.vsh
│ │ │ ├── Gray.fsh
│ │ │ ├── Gray.vsh
│ │ │ ├── HexagonMosaic.fsh
│ │ │ ├── HexagonMosaic.vsh
│ │ │ ├── Mosaic.fsh
│ │ │ ├── Mosaic.vsh
│ │ │ ├── Scale.fsh
│ │ │ ├── Scale.vsh
│ │ │ ├── Shake.fsh
│ │ │ ├── Shake.vsh
│ │ │ ├── SoulOut.fsh
│ │ │ ├── SoulOut.vsh
│ │ │ ├── SplitScreen_1.fsh
│ │ │ ├── SplitScreen_1.vsh
│ │ │ ├── SplitScreen_16.fsh
│ │ │ ├── SplitScreen_16.vsh
│ │ │ ├── SplitScreen_2.fsh
│ │ │ ├── SplitScreen_2.vsh
│ │ │ ├── SplitScreen_3.fsh
│ │ │ ├── SplitScreen_3.vsh
│ │ │ ├── SplitScreen_4.fsh
│ │ │ ├── SplitScreen_4.vsh
│ │ │ ├── SplitScreen_6.fsh
│ │ │ ├── SplitScreen_6.vsh
│ │ │ ├── SplitScreen_9.fsh
│ │ │ ├── SplitScreen_9.vsh
│ │ │ ├── shaderf.fsh
│ │ │ └── shaderv.vsh
│ │ └── View
│ │ │ ├── SLSplitScreenCell.h
│ │ │ └── SLSplitScreenCell.m
│ ├── Recource
│ │ ├── .DS_Store
│ │ └── Resources.bundle
│ │ │ ├── Audio
│ │ │ └── The love of one's life.mp3
│ │ │ ├── Images
│ │ │ ├── lf.jpeg
│ │ │ ├── lufei.png
│ │ │ ├── 素材1.png
│ │ │ └── 素材2.png
│ │ │ └── StickingImages
│ │ │ ├── stickers_0.gif
│ │ │ ├── stickers_1.gif
│ │ │ ├── stickers_10.png
│ │ │ ├── stickers_11.jpeg
│ │ │ ├── stickers_12.gif
│ │ │ ├── stickers_13.jpeg
│ │ │ ├── stickers_14.jpeg
│ │ │ ├── stickers_15.jpeg
│ │ │ ├── stickers_16.gif
│ │ │ ├── stickers_17.gif
│ │ │ ├── stickers_18.gif
│ │ │ ├── stickers_19.gif
│ │ │ ├── stickers_2.gif
│ │ │ ├── stickers_3.jpeg
│ │ │ ├── stickers_4.gif
│ │ │ ├── stickers_5.gif
│ │ │ ├── stickers_6.jpg
│ │ │ ├── stickers_7.gif
│ │ │ ├── stickers_8.jpg
│ │ │ └── stickers_9.gif
│ ├── SLCategory
│ │ ├── NSDictionary+SLExtension.h
│ │ ├── NSDictionary+SLExtension.m
│ │ ├── UIButton+SLTitleImage.h
│ │ ├── UIButton+SLTitleImage.m
│ │ ├── UIColor+SLCommon.h
│ │ ├── UIColor+SLCommon.m
│ │ ├── UIImage+SLCommon.h
│ │ ├── UIImage+SLCommon.m
│ │ ├── UIScrollView+SLCommon.h
│ │ ├── UIScrollView+SLCommon.m
│ │ ├── UIView+SLFrame.h
│ │ ├── UIView+SLFrame.m
│ │ ├── UIView+SLImage.h
│ │ ├── UIView+SLImage.m
│ │ ├── WKWebView+SLExtension.h
│ │ └── WKWebView+SLExtension.m
│ ├── SceneDelegate.h
│ ├── SceneDelegate.m
│ ├── ThirdLibary
│ │ ├── BSBacktraceLogger
│ │ │ ├── BSBacktraceLogger.h
│ │ │ └── BSBacktraceLogger.m
│ │ ├── Fishhook
│ │ │ ├── fishhook.c
│ │ │ ├── fishhook.h
│ │ │ ├── queue.c
│ │ │ └── queue.h
│ │ ├── OpenGLUtils
│ │ │ ├── GLESMath.c
│ │ │ ├── GLESMath.h
│ │ │ ├── GLESUtils.h
│ │ │ ├── GLESUtils.m
│ │ │ ├── Quaternion.h
│ │ │ └── Vector.h
│ │ ├── Reachability
│ │ │ ├── Reachability.h
│ │ │ └── Reachability.m
│ │ └── YYAnimatedImageViewCategory
│ │ │ ├── YYAnimatedImageView+iOS14.h
│ │ │ └── YYAnimatedImageView+iOS14.m
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── WKWebView
│ │ ├── SLTableViewController.h
│ │ ├── SLTableViewController.m
│ │ ├── SLUrlProtocolAddCookie.h
│ │ ├── SLUrlProtocolAddCookie.m
│ │ ├── SLWebViewController.h
│ │ ├── SLWebViewController.m
│ │ ├── SLWebViewListController.h
│ │ ├── SLWebViewListController.m
│ │ ├── WebCache
│ │ │ ├── SLUrlCache.h
│ │ │ ├── SLUrlCache.m
│ │ │ ├── SLUrlProtocol.h
│ │ │ ├── SLUrlProtocol.m
│ │ │ ├── SLWebCacheManager.h
│ │ │ ├── SLWebCacheManager.m
│ │ │ ├── SLWebCacheViewController.h
│ │ │ └── SLWebCacheViewController.m
│ │ ├── WebNative
│ │ │ ├── SLPictureBrowseController.h
│ │ │ ├── SLPictureBrowseController.m
│ │ │ ├── SLPictureTransitionAnimation.h
│ │ │ ├── SLPictureTransitionAnimation.m
│ │ │ ├── SLReusableManager.h
│ │ │ ├── SLReusableManager.m
│ │ │ ├── SLWebNativeViewController.h
│ │ │ ├── SLWebNativeViewController.m
│ │ │ ├── WebNative.html
│ │ │ └── WebNativeJson.txt
│ │ ├── WebTableView.html
│ │ ├── WebTableView
│ │ │ ├── SLDynamicItem.h
│ │ │ ├── SLDynamicItem.m
│ │ │ ├── SLScrollViewController.h
│ │ │ ├── SLScrollViewController.m
│ │ │ ├── SLWebTableViewController.h
│ │ │ ├── SLWebTableViewController.m
│ │ │ ├── SLWebTableViewController2.h
│ │ │ ├── SLWebTableViewController2.m
│ │ │ ├── SLWebTableViewController3.h
│ │ │ ├── SLWebTableViewController3.m
│ │ │ ├── SLWebTableViewController4.h
│ │ │ └── SLWebTableViewController4.m
│ │ └── wsl.png
│ ├── WorkIssues
│ │ ├── APM
│ │ │ ├── APMMonitor
│ │ │ │ ├── QiCallTraceCore.c
│ │ │ │ ├── QiCallTraceCore.h
│ │ │ │ ├── SLAPMCpu.h
│ │ │ │ ├── SLAPMCpu.m
│ │ │ │ ├── SLAPMFluency.h
│ │ │ │ ├── SLAPMFluency.m
│ │ │ │ ├── SLAPMLoadTime.h
│ │ │ │ ├── SLAPMLoadTime.m
│ │ │ │ ├── SLAPMManager.h
│ │ │ │ ├── SLAPMManager.m
│ │ │ │ ├── SLAPMMemoryDisk.h
│ │ │ │ ├── SLAPMMemoryDisk.m
│ │ │ │ ├── SLAPMThreadCount.h
│ │ │ │ ├── SLAPMThreadCount.m
│ │ │ │ ├── SLAPMURLProtocol.h
│ │ │ │ ├── SLAPMURLProtocol.m
│ │ │ │ ├── SLSystemAppInfo.h
│ │ │ │ ├── SLSystemAppInfo.m
│ │ │ │ ├── UIViewController+SLAPMVCTime.h
│ │ │ │ └── UIViewController+SLAPMVCTime.m
│ │ │ ├── SLAPMViewController.h
│ │ │ └── SLAPMViewController.m
│ │ ├── SLWorkIssuesViewController.h
│ │ ├── SLWorkIssuesViewController.m
│ │ ├── ScrollView嵌套
│ │ │ ├── SLMenuView.h
│ │ │ ├── SLMenuView.m
│ │ │ ├── SLPanTableView.h
│ │ │ ├── SLPanTableView.m
│ │ │ ├── SLScrollViewJianShu.h
│ │ │ ├── SLScrollViewJianShu.m
│ │ │ ├── SLScrollViewJuejin.h
│ │ │ ├── SLScrollViewJuejin.m
│ │ │ ├── SLScrollViewWeibo.h
│ │ │ ├── SLScrollViewWeibo.m
│ │ │ ├── SLScrollviewNesteVC.h
│ │ │ └── SLScrollviewNesteVC.m
│ │ ├── UIMenuController
│ │ │ ├── SLMenuViewController.h
│ │ │ ├── SLMenuViewController.m
│ │ │ └── SLMenuViewController.xib
│ │ ├── 二进制重排
│ │ │ ├── Order File.png
│ │ │ ├── Other c Flags.png
│ │ │ ├── SLBinaryResetViewController.h
│ │ │ ├── SLBinaryResetViewController.m
│ │ │ ├── Write Link Map File.png
│ │ │ └── wsl.order
│ │ ├── 已浏览.md
│ │ ├── 查找项目无用资源
│ │ │ ├── SLResourceInfo.h
│ │ │ ├── SLResourceInfo.m
│ │ │ ├── SLUnusedResourceViewController.h
│ │ │ ├── SLUnusedResourceViewController.m
│ │ │ └── unused.png
│ │ ├── 笔记.md
│ │ ├── 面试题.md
│ │ └── 高质量技术博客.md
│ └── main.m
├── DarkModeTests
│ ├── DarkModeTests.m
│ └── Info.plist
├── DarkModeUITests
│ ├── DarkModeUITests.m
│ └── Info.plist
└── Podfile
└── 微信公众号.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | # CocoaPods
32 | #
33 | # We recommend against adding the Pods directory to your .gitignore. However
34 | # you should judge for yourself, the pros and cons are mentioned at:
35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36 | #
37 | # Pods/
38 |
39 | # Carthage
40 | #
41 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
42 | # Carthage/Checkouts
43 |
44 | Carthage/Build
45 |
46 | # fastlane
47 | #
48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49 | # screenshots whenever they are needed.
50 | # For more information about the recommended setup visit:
51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
52 |
53 | fastlane/report.xml
54 | fastlane/Preview.html
55 | fastlane/screenshots/**/*.png
56 | fastlane/test_output
57 |
58 | # Code Injection
59 | #
60 | # After new code Injection tools there's a generated folder /iOSInjectionProject
61 | # https://github.com/johnno1962/injectionforxcode
62 |
63 | iOSInjectionProject/
64 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/AddingTheSignInWithAppleFlowToYourApp/.DS_Store
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Configuration/SampleCode.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // See LICENSE folder for this sample’s licensing information.
3 | //
4 | // SampleCode.xcconfig
5 | //
6 |
7 | // The `SAMPLE_CODE_DISAMBIGUATOR` configuration is to make it easier to build
8 | // and run a sample code project. Once you set your project's development team,
9 | // you'll have a unique bundle identifier. This is because the bundle identifier
10 | // is derived based on the 'SAMPLE_CODE_DISAMBIGUATOR' value. Do not use this
11 | // approach in your own projects—it's only useful for sample code projects because
12 | // they are frequently downloaded and don't have a development team set.
13 | SAMPLE_CODE_DISAMBIGUATOR=${DEVELOPMENT_TEAM}
14 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice.xcodeproj/.xcodesamplecode.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Latest
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/AddingTheSignInWithAppleFlowToYourApp/Juice/.DS_Store
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | /*
2 | See LICENSE folder for this sample’s licensing information.
3 |
4 | Abstract:
5 | Main application delegate.
6 | */
7 |
8 | import UIKit
9 | import AuthenticationServices
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
17 | let appleIDProvider = ASAuthorizationAppleIDProvider()
18 | appleIDProvider.getCredentialState(forUserID: KeychainItem.currentUserIdentifier) { (credentialState, error) in
19 | switch credentialState {
20 | case .authorized:
21 | // The Apple ID credential is valid.
22 | break
23 | case .revoked:
24 | // The Apple ID credential is revoked.
25 | break
26 | case .notFound:
27 | // No credential was found, so show the sign-in UI.
28 | DispatchQueue.main.async {
29 | let storyboard = UIStoryboard(name: "Main", bundle: nil)
30 | guard let viewController = storyboard.instantiateViewController(withIdentifier: "loginViewController") as? LoginViewController
31 | else { return }
32 | viewController.modalPresentationStyle = .formSheet
33 | viewController.isModalInPresentation = true
34 | self.window?.rootViewController?.present(viewController, animated: true, completion: nil)
35 | }
36 | default:
37 | break
38 | }
39 | }
40 | return true
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/Juice.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.applesignin
6 |
7 | Default
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/ResultViewController.swift:
--------------------------------------------------------------------------------
1 | /*
2 | See LICENSE folder for this sample’s licensing information.
3 |
4 | Abstract:
5 | Main application view controller.
6 | */
7 |
8 | import UIKit
9 | import AuthenticationServices
10 |
11 | class ResultViewController: UIViewController {
12 |
13 | @IBOutlet weak var userIdentifierLabel: UILabel!
14 | @IBOutlet weak var givenNameLabel: UILabel!
15 | @IBOutlet weak var familyNameLabel: UILabel!
16 | @IBOutlet weak var emailLabel: UILabel!
17 | @IBOutlet weak var signOutButton: UIButton!
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 | userIdentifierLabel.text = KeychainItem.currentUserIdentifier
22 | }
23 |
24 |
25 | @IBAction func signOutButtonPressed() {
26 | // For the purpose of this demo app, delete the user identifier that was previously stored in the keychain.
27 | KeychainItem.deleteUserIdentifierFromKeychain()
28 |
29 | // Clear the user interface.
30 | userIdentifierLabel.text = ""
31 | givenNameLabel.text = ""
32 | familyNameLabel.text = ""
33 | emailLabel.text = ""
34 |
35 | // Display the login controller again.
36 | DispatchQueue.main.async {
37 | let storyboard = UIStoryboard(name: "Main", bundle: nil)
38 | guard let viewController = storyboard.instantiateViewController(withIdentifier: "loginViewController") as? LoginViewController
39 | else { return }
40 | viewController.modalPresentationStyle = .formSheet
41 | viewController.isModalInPresentation = true
42 | self.present(viewController, animated: true, completion: nil)
43 | }
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/Supporting Files/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/AddingTheSignInWithAppleFlowToYourApp/Juice/Supporting Files/.DS_Store
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/Supporting Files/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/Supporting Files/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 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/Juice/Supporting Files/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
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 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/LICENSE/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright © 2019 Apple Inc.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
9 |
--------------------------------------------------------------------------------
/AddingTheSignInWithAppleFlowToYourApp/README.md:
--------------------------------------------------------------------------------
1 | # Adding the Sign In with Apple Flow to Your App
2 |
3 | Provide a fast, secure, and privacy-friendly way for users to set up an account and start using your services.
4 |
5 | ## Overview
6 |
7 | - Note: This sample code project is associated with WWDC 2019 session [706: Introducing Sign In with Apple](https://developer.apple.com/videos/play/wwdc19/706/).
8 |
9 | ## Configure the Sample Code Project
10 |
11 | Perform the following steps before building and running the app:
12 |
13 | 1. Set your development team in the Signing & Capabilities tab so Xcode can create a provisioning profile that uses the Sign In with Apple capability.
14 | 2. Choose a target device that you’re signed into with an Apple ID that uses Two-Factor Authentication.
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 wsl
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/QQ交流群.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/QQ交流群.png
--------------------------------------------------------------------------------
/VideoEncoder&Decoder.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/VideoEncoder&Decoder.zip
--------------------------------------------------------------------------------
/iOS_Tips/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/ColorPicker/SLColorPickerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLColorPickerViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/9.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///拾色器 利用摄像头实时识别颜色
14 | @interface SLColorPickerViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/FaceDetect/SLFaceDetectController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLFaceDetectController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/6.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///人脸检测
14 | @interface SLFaceDetectController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/Filter/SLFilterViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLFilterViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/7.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 实时滤镜拍摄
14 | @interface SLFilterViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/GPUImageDemo/Controller/SLGPUImageController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLGPUImageController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/11.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// GPUImage框架使用示例 疑问: 第一次启动摄像头特别慢?
14 | @interface SLGPUImageController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/GPUImageDemo/Controller/SLWaterMarkController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWaterMarkController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/14.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 添加水印 文字和GIF图
14 | @interface SLWaterMarkController : UIViewController
15 | @property (nonatomic, strong) NSURL *videoPath; //当前拍摄的视频路径
16 | @property (nonatomic, assign) UIDeviceOrientation videoOrientation;// 视频方向
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SLAVListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAVListViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/9.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLAVListViewController : UITableViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/AVFoundation/SmallVideo/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/Controller/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/AVFoundation/SmallVideo/Controller/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/Controller/SLEditImageController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLEditImageController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/31.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLEditImageController : UIViewController
14 | @property (nonatomic, strong) UIImage *image; //当前拍摄的照片
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/Controller/SLEditVideoController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLEditViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/12.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 拍摄完毕后 编辑
14 | @interface SLEditVideoController : UIViewController
15 | @property (nonatomic, strong) NSURL *videoPath; //当前拍摄的视频路径
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/Controller/SLImageClipController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLImageClipController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/2.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLImageClipController : UIViewController
14 | @property (nonatomic, strong) UIImage *image;
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/Controller/SLShotViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLShotViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/18.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 拍摄视图控制器
14 | @interface SLShotViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLDrawView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLDrawView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/12.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 涂鸦视图 画板 默认白底
14 | @interface SLDrawView : UIView
15 |
16 | /// 线粗 默认5.0
17 | @property (nonatomic, assign) CGFloat lineWidth;
18 | /// 线颜色 默认 黑色
19 | @property (nonatomic, strong) UIColor *lineColor;
20 | /// 正在绘画
21 | @property (nonatomic, readonly) BOOL isDrawing;
22 | /// 能否返回
23 | @property (nonatomic, readonly) BOOL canBack;
24 | /// 能否前进
25 | @property (nonatomic, readonly) BOOL canForward;
26 | /// 开始绘画
27 | @property (nonatomic, copy) void(^drawBegan)(void);
28 | /// 结束绘画
29 | @property (nonatomic, copy) void(^drawEnded)(void);
30 |
31 | /// 数据 笔画数据
32 | @property (nonatomic, strong) NSDictionary *data;
33 |
34 | /// 前进一步
35 | - (void)goForward;
36 | /// 返回一步
37 | - (void)goBack;
38 | /// 清空画板 不可恢复
39 | - (void)clear;
40 |
41 | @end
42 |
43 | NS_ASSUME_NONNULL_END
44 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLEditMenuView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLEditMenuView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/9.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 | ///编辑对象类型 视频 Or 图片
13 | typedef NS_ENUM(NSUInteger, SLEditObject) {
14 | ///没有编辑对象
15 | SLEditObjectUnknow = 0,
16 | /// 图片编辑
17 | SLEditObjectPicture = 1,
18 | /// 视频编辑
19 | SLEditObjectVideo
20 | };
21 | ///视频和图片的编辑类型
22 | typedef NS_ENUM(NSUInteger, SLEditMenuType) {
23 | /// 无类型
24 | SLEditMenuTypeUnknown = 0,
25 | /// 涂鸦
26 | SLEditMenuTypeGraffiti = 1,
27 | /// 文字
28 | SLEditMenuTypeText,
29 | /// 贴画
30 | SLEditMenuTypeSticking,
31 | /// 视频裁剪
32 | SLEditMenuTypeVideoClipping,
33 | /// 图片马赛克
34 | SLEditMenuTypePictureMosaic,
35 | /// 图片裁剪
36 | SLEditMenuTypePictureClipping
37 | };
38 | /// 底部音视频、图片编辑主菜单栏
39 | @interface SLEditMenuView : UIView
40 | /// 编辑对象
41 | @property (nonatomic, assign) SLEditObject editObject;
42 | /// 选择编辑的子菜单回调
43 | @property (nonatomic, copy) void(^selectEditMenu)(SLEditMenuType editMenuType, NSDictionary * _Nullable setting);
44 |
45 | @end
46 |
47 | NS_ASSUME_NONNULL_END
48 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLEditSelectedBox.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLEditSelectedBox.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/23.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 水印选中框/高亮框
14 | @interface SLEditSelectedBox : UIView
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLEditTextView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLEditTextView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/17.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 文本水印编辑 工具
14 | @interface SLEditTextView : UIView
15 | /// 编辑文本完成
16 | @property (nonatomic, copy) void(^editTextCompleted)(UILabel * _Nullable label);
17 | /// 配置编辑参数 文本颜色textColor、背景颜色backgroundColor、文本text
18 | @property (nonatomic, copy) void(^configureEditParameters)(NSDictionary *parameters);
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLEditVideoClipping.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLEditVideoClipping.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/21.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /// 视频裁剪底部子菜单 选择裁剪范围
15 | @interface SLEditVideoClipping : UIView
16 | /// 视频资源文件
17 | @property (nonatomic, strong) AVAsset *asset;
18 | /// 选择视频截取起点
19 | @property (nonatomic, copy) void(^selectedClippingBegin)(CMTime beginTime, CMTime endTime, UIGestureRecognizerState state);
20 | /// 选择视频截取终点
21 | @property (nonatomic, copy) void(^selectedClippingEnd)(CMTime beginTime, CMTime endTime, UIGestureRecognizerState state);
22 | /// 退出截取菜单
23 | @property (nonatomic, copy) void(^exitClipping)(void);
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLGridView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLGridView.h
3 | //
4 | // Created by wsl on 2019/10/27.
5 | // Copyright © 2019 wsl. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 | @class SLGridView;
12 | /// 网格调整大小代理
13 | @protocol SLGridViewDelegate
14 | @optional
15 | /// 开始调整大小
16 | - (void)gridViewDidBeginResizing:(SLGridView *)gridView;
17 | /// 正在调整大小
18 | - (void)gridViewDidResizing:(SLGridView *)gridView;
19 | /// 结束调整大小
20 | - (void)gridViewDidEndResizing:(SLGridView *)gridView;
21 | @end
22 |
23 | /// 网格视图
24 | @interface SLGridView : UIView
25 | /// 网格区域 默认CGRectInset(self.bounds, 20, 20)
26 | @property (nonatomic, assign) CGRect gridRect;
27 | /// 网格 最小尺寸 默认 CGSizeMake(60, 60);
28 | @property (nonatomic, assign) CGSize minGridSize;
29 | /// 网格最大区域 默认 CGRectInset(self.bounds, 20, 20)
30 | @property (nonatomic, assign) CGRect maxGridRect;
31 | /// 原来尺寸 默认CGRectInset(self.bounds, 20, 20).size
32 | @property (nonatomic, assign) CGSize originalGridSize;
33 | /// 网格代理
34 | @property (nonatomic, weak) id delegate;
35 | /// 显示遮罩层 半透明黑色 默认 YES
36 | @property (nonatomic, assign) BOOL showMaskLayer;
37 | /// 是否正在拖动
38 | @property(nonatomic,assign,readonly) BOOL dragging;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLImageZoomView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLScrollView.h
3 | //
4 | // Created by wsl on 2019/10/27.
5 | // Copyright © 2019 wsl. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @protocol SLImageZoomViewDelegate;
13 | /// 缩放视图 用于图片编辑
14 | @interface SLImageZoomView : UIScrollView
15 | @property (nonatomic, strong) UIImage *image;
16 | //
17 | @property (nonatomic, strong) UIImageView *imageView;
18 | @property (nonatomic, weak) id zoomViewDelegate;
19 | @end
20 |
21 | /// 缩放视图代理
22 | @protocol SLImageZoomViewDelegate
23 | @optional
24 | /// 开始移动图像位置
25 | - (void)zoomViewDidBeginMoveImage:(SLImageZoomView *)zoomView;
26 | /// 结束移动图像
27 | - (void)zoomViewDidEndMoveImage:(SLImageZoomView *)zoomView;
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLMosaicView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLMosaicView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/25.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 马赛克类型
14 | typedef NS_ENUM(NSUInteger, SLMosaicType) {
15 | /// 方块马赛克
16 | SLMosaicTypeSquare,
17 | /// 画笔涂抹
18 | SLMosaicTypePaintbrush
19 | };
20 | /// 马赛克 画板
21 | @interface SLMosaicView : UIView
22 | /// 马赛克类型
23 | @property (nonatomic, assign) SLMosaicType mosaicType;
24 | /// 马赛克方块大小 默认15
25 | @property (nonatomic, assign) CGFloat squareWidth;
26 | /// 画笔涂抹大小 默认 (50, 50)
27 | @property (nonatomic, assign) CGSize paintSize;
28 | /// 正在涂抹
29 | @property (nonatomic, readonly) BOOL isBrushing;
30 | /// 开始涂抹
31 | @property (nonatomic, copy) void(^brushBegan)(void);
32 | /// 涂抹结束
33 | @property (nonatomic, copy) void(^brushEnded)(void);
34 | ///某个点的颜色
35 | @property (nonatomic, copy) UIColor *(^brushColor)(CGPoint point);
36 |
37 | /// 数据
38 | @property (nonatomic, strong) NSDictionary *data;
39 |
40 | /// 是否可撤销
41 | - (BOOL)canBack;
42 | // 撤销
43 | - (void)goBack;
44 | /// 清空画板 不可恢复
45 | - (void)clear;
46 | @end
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLShotFocusView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLShotFocusView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/23.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 聚焦时的焦点视图
14 | @interface SLShotFocusView : UIView
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/16.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120-1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/20.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/29.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40-1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58-1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/60.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80-1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaic.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditBrushMosaic@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditBrushMosaic@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaic.imageset/EditBrushMosaic@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaic.imageset/EditBrushMosaic@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaic.imageset/EditBrushMosaic@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaic.imageset/EditBrushMosaic@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaicSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditBrushMosaicSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditBrushMosaicSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaicSelected.imageset/EditBrushMosaicSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaicSelected.imageset/EditBrushMosaicSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaicSelected.imageset/EditBrushMosaicSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditBrushMosaicSelected.imageset/EditBrushMosaicSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipCancel.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditImageClipCancel@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditImageClipCancel@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipCancel.imageset/EditImageClipCancel@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipCancel.imageset/EditImageClipCancel@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipCancel.imageset/EditImageClipCancel@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipCancel.imageset/EditImageClipCancel@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipDone.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditImageClipDone@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditImageClipDone@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipDone.imageset/EditImageClipDone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipDone.imageset/EditImageClipDone@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipDone.imageset/EditImageClipDone@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditImageClipDone.imageset/EditImageClipDone@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuClipImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuClipImage@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuClipImage@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuClipImage.imageset/EditMenuClipImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuClipImage.imageset/EditMenuClipImage@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuClipImage.imageset/EditMenuClipImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuClipImage.imageset/EditMenuClipImage@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCut.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuCut@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuCut@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCut.imageset/EditMenuCut@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCut.imageset/EditMenuCut@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCut.imageset/EditMenuCut@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCut.imageset/EditMenuCut@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCutSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuCutSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuCutSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCutSelected.imageset/EditMenuCutSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCutSelected.imageset/EditMenuCutSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCutSelected.imageset/EditMenuCutSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuCutSelected.imageset/EditMenuCutSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffiti.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuGraffiti@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuGraffiti@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffiti.imageset/EditMenuGraffiti@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffiti.imageset/EditMenuGraffiti@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffiti.imageset/EditMenuGraffiti@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffiti.imageset/EditMenuGraffiti@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiBack.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuGraffitiBack@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuGraffitiBack@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiBack.imageset/EditMenuGraffitiBack@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiBack.imageset/EditMenuGraffitiBack@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiBack.imageset/EditMenuGraffitiBack@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiBack.imageset/EditMenuGraffitiBack@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuGraffitiSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuGraffitiSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiSelected.imageset/EditMenuGraffitiSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiSelected.imageset/EditMenuGraffitiSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiSelected.imageset/EditMenuGraffitiSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuGraffitiSelected.imageset/EditMenuGraffitiSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaic.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuMosaic@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuMosaic@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaic.imageset/EditMenuMosaic@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaic.imageset/EditMenuMosaic@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaic.imageset/EditMenuMosaic@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaic.imageset/EditMenuMosaic@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaicSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuMosaicSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuMosaicSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaicSelected.imageset/EditMenuMosaicSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaicSelected.imageset/EditMenuMosaicSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaicSelected.imageset/EditMenuMosaicSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuMosaicSelected.imageset/EditMenuMosaicSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuSticker.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuSticker@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuSticker@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuSticker.imageset/EditMenuSticker@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuSticker.imageset/EditMenuSticker@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuSticker.imageset/EditMenuSticker@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuSticker.imageset/EditMenuSticker@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuStickerSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuStickerSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuStickerSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuStickerSelected.imageset/EditMenuStickerSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuStickerSelected.imageset/EditMenuStickerSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuStickerSelected.imageset/EditMenuStickerSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuStickerSelected.imageset/EditMenuStickerSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuText.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuText@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuText@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuText.imageset/EditMenuText@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuText.imageset/EditMenuText@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuText.imageset/EditMenuText@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuText.imageset/EditMenuText@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextBackgroundColor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuTextBackgroundColor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuTextBackgroundColor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextBackgroundColor.imageset/EditMenuTextBackgroundColor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextBackgroundColor.imageset/EditMenuTextBackgroundColor@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextBackgroundColor.imageset/EditMenuTextBackgroundColor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextBackgroundColor.imageset/EditMenuTextBackgroundColor@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextColor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuText@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuText@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextColor.imageset/EditMenuText@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextColor.imageset/EditMenuText@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextColor.imageset/EditMenuText@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextColor.imageset/EditMenuText@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMenuTextSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMenuTextSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextSelected.imageset/EditMenuTextSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextSelected.imageset/EditMenuTextSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextSelected.imageset/EditMenuTextSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMenuTextSelected.imageset/EditMenuTextSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMosaicBrush.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditMosaicBrush@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditMosaicBrush@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMosaicBrush.imageset/EditMosaicBrush@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMosaicBrush.imageset/EditMosaicBrush@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMosaicBrush.imageset/EditMosaicBrush@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditMosaicBrush.imageset/EditMosaicBrush@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaic.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditTraditionalMosaic@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditTraditionalMosaic@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaic.imageset/EditTraditionalMosaic@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaic.imageset/EditTraditionalMosaic@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaic.imageset/EditTraditionalMosaic@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaic.imageset/EditTraditionalMosaic@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaicSelected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "EditTraditionalMosaicSelected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "EditTraditionalMosaicSelected@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaicSelected.imageset/EditTraditionalMosaicSelected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaicSelected.imageset/EditTraditionalMosaicSelected@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaicSelected.imageset/EditTraditionalMosaicSelected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/EditTraditionalMosaicSelected.imageset/EditTraditionalMosaicSelected@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/back.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "back@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "back@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/back.imageset/back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/back.imageset/back@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/back.imageset/back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/back.imageset/back@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cameraAround.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "record_video_camera@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "record_video_camera@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cameraAround.imageset/record_video_camera@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cameraAround.imageset/record_video_camera@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cameraAround.imageset/record_video_camera@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cameraAround.imageset/record_video_camera@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cancle.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "cancle@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "cancle@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cancle.imageset/cancle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cancle.imageset/cancle@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cancle.imageset/cancle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/cancle.imageset/cancle@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/edit.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "edit@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "edit@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/edit.imageset/edit@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/edit.imageset/edit@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/edit.imageset/edit@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/edit.imageset/edit@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/save.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "save@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "save@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/save.imageset/save@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/save.imageset/save@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/save.imageset/save@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/SmallVideo/save.imageset/save@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "1x",
10 | "appearances" : [
11 | {
12 | "appearance" : "luminosity",
13 | "value" : "dark"
14 | }
15 | ]
16 | },
17 | {
18 | "idiom" : "universal",
19 | "filename" : "apple@2x-1.png",
20 | "scale" : "2x"
21 | },
22 | {
23 | "idiom" : "universal",
24 | "filename" : "apple@2x.png",
25 | "appearances" : [
26 | {
27 | "appearance" : "luminosity",
28 | "value" : "dark"
29 | }
30 | ],
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "universal",
35 | "filename" : "apple@3x-1.png",
36 | "scale" : "3x"
37 | },
38 | {
39 | "idiom" : "universal",
40 | "filename" : "apple@3x.png",
41 | "appearances" : [
42 | {
43 | "appearance" : "luminosity",
44 | "value" : "dark"
45 | }
46 | ],
47 | "scale" : "3x"
48 | }
49 | ],
50 | "info" : {
51 | "version" : 1,
52 | "author" : "xcode"
53 | }
54 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@2x-1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@3x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@3x-1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/apple.imageset/apple@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/face.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "face@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "face@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/face.imageset/face@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/face.imageset/face@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/face.imageset/face@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/face.imageset/face@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "filename" : "nav_return_white@2x.png",
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "filename" : "nav_return_white@3x.png",
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@2x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@3x.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/play.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "play.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Assets.xcassets/play.imageset/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Assets.xcassets/play.imageset/play.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Crash/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSArray+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+SLCrashProtector.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/13.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 不可变数组 越界、nil值 Crash 防护
14 | @interface NSArray (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSDictionary+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+SLCrash.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/13.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | // 不可变字典 越界、nil值 Crash防护
14 | @interface NSDictionary (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableArray+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableArray+Crash.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/12.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 可变数组 越界、nil值 Crash防护
14 | @interface NSMutableArray (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableDictionary+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableDictionary+SLCrash.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/13.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | //可变字典 越界、nil值 Crash防护
14 | @interface NSMutableDictionary (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableString+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableString+SLCrashProtector.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/14.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///可变字符串 越界crash 防护
14 | @interface NSMutableString (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+SLCrashProtector.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/14.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 未识别方法 KVO KVC crash防护
14 | @interface NSObject (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLMLeakFinder.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+SLMLeakFinder.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/6.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 思路来源: https://github.com/Tencent/MLeaksFinder
14 | @interface NSObject (SLMLeakFinder)
15 | ///即将释放时调用此方法
16 | - (BOOL)willDealloc;
17 | //
18 | /////即将释放子对象
19 | //- (void)willReleaseChild:(id)child;
20 | /////即将释放子对象集合
21 | //- (void)willReleaseChildren:(NSArray *)children;
22 | //
23 | /////返回视图堆栈信息
24 | //- (NSArray *)viewStack;
25 | ///添加需要监测内存泄漏的白名单类
26 | + (void)addClassNamesToWhitelist:(NSArray *)classNames;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSString+SLCrashProtector.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+SLCrashProtector.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/14.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///不可变字符串 越界crash 防护
14 | @interface NSString (SLCrashProtector)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLKVODelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLKVODelegate.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/16.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 观察者代理 存储管理KVO的信息
14 | @interface SLKVODelegate : NSObject
15 | /**
16 | 将添加kvo时的相关信息加入到关系maps中,对应原有的添加观察者
17 |
18 | @param observer observer观察者
19 | @param keyPath keyPath
20 | @param options options
21 | @param context context
22 | */
23 | - (BOOL)addInfoToMapWithObserver:(NSObject *)observer
24 | forKeyPath:(NSString *)keyPath
25 | options:(NSKeyValueObservingOptions)options
26 | context:(void *)context ;
27 |
28 | /**
29 | 从关系maps中移除观察者 对应原有的移除观察者操作
30 |
31 | @param observer 实际观察者
32 | @param keyPath keypath
33 | @param context context
34 | @return 是否移除成功
35 | 如果重复移除,会返回NO
36 | */
37 | - (BOOL)removeInfoInMapWithObserver:(NSObject *)observer
38 | forKeyPath:(NSString *)keyPath
39 | context:(void *)context;
40 |
41 | /**
42 | 从关系maps中移除观察者 对应原有的移除观察者操作
43 |
44 | @param observer 实际观察者
45 | @param keyPath keypath
46 | @return 是否移除成功
47 | 如果重复移除,会返回NO
48 | */
49 | - (BOOL)removeInfoInMapWithObserver:(NSObject *)observer
50 | forKeyPath:(NSString *)keyPath;
51 |
52 | /*
53 | 获取所有被观察的 keyPaths
54 | */
55 | - (NSArray *)getAllKeyPaths;
56 |
57 | @end
58 |
59 | NS_ASSUME_NONNULL_END
60 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieCatcher.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLZombieCatcher.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 | /*
13 | -fno-objc-arc 记得设置此类编译方式支持MRC
14 | */
15 | ///僵尸对象,处理发向野指针的消息 定位到方法
16 | @interface SLZombieCatcher : NSProxy
17 | ///原类
18 | @property (nonatomic, assign) Class originClass;
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLZombieFinder.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*
14 | -fno-objc-arc 记得设置此类编译方式支持MRC
15 | */
16 | ///zombie/野指针对象嗅探器 目前还不完善,不推荐使用 ,仅做交流学习 来源:https://github.com/sindrilin/LXDZombieSniffer.git
17 | @interface SLZombieFinder : NSObject
18 |
19 | ///启动zombie嗅探
20 | + (void)startSniffer;
21 |
22 | ///关闭zombie嗅探
23 | + (void)closeSniffer;
24 |
25 | ///添加嗅探白名单类 不嗅探名单之内的类
26 | + (void)appendIgnoreClass: (Class)cls;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieSafeFree.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLZombieSafeFree.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*
14 | 此类依赖于三方 fishhook
15 | -fno-objc-arc 记得设置此类编译方式支持MRC
16 | */
17 | /// 捕获C函数的free内存释放方法 该类已弃用,有Hook冲突问题
18 | @interface SLZombieSafeFree : NSObject
19 | //系统内存警告的时候调用这个函数释放一些内存
20 | void free_some_mem(size_t freeNum);
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/UINavigationController+SLMLeakFinder.h:
--------------------------------------------------------------------------------
1 | //
2 | // UINavigationController+SLMLeakFinder.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/6.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UINavigationController (SLMLeakFinder)
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SLAsynUpdateUI.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/7.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///异步更新UI 防护
14 | @interface UIView (SLAsynUpdateUI)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLMLeakFinder.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SLMLeakFinder.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UIView (SLMLeakFinder)
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLMLeakFinder.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SLMLeakFinder.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "UIView+SLMLeakFinder.h"
10 | #import "NSObject+SLMLeakFinder.h"
11 |
12 | @implementation UIView (SLMLeakFinder)
13 |
14 | - (BOOL)willDealloc {
15 | if (![super willDealloc]) {
16 | return NO;
17 | }
18 | return YES;
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIViewController+SLMLeakFinder.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+SLMLeakFinder.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/6.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UIViewController (SLMLeakFinder)
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIViewController+SLMLeakFinder.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+SLMLeakFinder.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/6.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "UIViewController+SLMLeakFinder.h"
10 | #import "SLCrashProtector.h"
11 | #import "NSObject+SLMLeakFinder.h"
12 |
13 | const void *const kSLHasBeenPoppedKey = &kSLHasBeenPoppedKey;
14 |
15 | @implementation UIViewController (SLMLeakFinder)
16 |
17 | + (void)load {
18 | static dispatch_once_t onceToken;
19 | dispatch_once(&onceToken, ^{
20 | // SL_ExchangeInstanceMethod([UIViewController class], @selector(viewDidDisappear:), [UIViewController class], @selector(sl_viewDidDisappear:));
21 | // SL_ExchangeInstanceMethod([UIViewController class], @selector(viewWillAppear:), [UIViewController class], @selector(sl_viewWillAppear:));
22 | SL_ExchangeInstanceMethod([UIViewController class], @selector(dismissViewControllerAnimated:completion:), [UIViewController class], @selector(sl_dismissViewControllerAnimated:completion:));
23 | });
24 | }
25 |
26 | ///dismiss时即将释放,调用willDealloc
27 | - (void)sl_dismissViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion {
28 | [self sl_dismissViewControllerAnimated:flag completion:completion];
29 | UIViewController *dismissedViewController = self.presentedViewController;
30 | if (!dismissedViewController && self.presentingViewController) {
31 | dismissedViewController = self;
32 | }
33 | if (!dismissedViewController) return;
34 | [dismissedViewController willDealloc];
35 | }
36 |
37 | - (BOOL)willDealloc {
38 | if (![super willDealloc]) {
39 | return NO;
40 | }
41 | return YES;
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Crash/SLCrashViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLCrashViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/11.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | //iOS Crash防护 注意:部分防护功能还不完善,比如野指针和内存泄漏/循环引用
14 | @interface SLCrashViewController : SLViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Dark/SLDarkModeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLDarkModeViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/17.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLDarkModeViewController : UIViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/General/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/AV/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/General/AV/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/AV/SLAvEditExport.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAvEditExport.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/14.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /// 导出编辑的音视频 默认AVFileTypeMPEG4
16 | @interface SLAvEditExport : NSObject
17 |
18 | /// 输出路径
19 | @property (nonatomic, strong) NSURL * _Nonnull outputURL;
20 | /// 音视频裁剪范围 默认不裁剪
21 | @property (nonatomic, assign) CMTimeRange timeRange;
22 | /// 速率 默认1.0 推荐设置范围:0.5~2.0
23 | @property (nonatomic, assign) float rate;
24 | /// 是否保留原生音频 默认YES
25 | @property (nonatomic, assign) BOOL isNativeAudio;
26 | /// 添加音频
27 | @property (nonatomic, strong, nullable) NSArray *audioUrls;
28 | /// 涂鸦层
29 | @property (nonatomic, strong, nullable) CALayer *graffitiLayer;
30 | /// 贴图 和文本 层集合
31 | @property (nonatomic, strong, nullable) NSMutableArray *stickerLayers;
32 |
33 | /// 初始化
34 | - (id)initWithAsset:(AVAsset *)asset;
35 | /// 导出编辑后的视频
36 | - (void)exportAsynchronouslyWithCompletionHandler:(void (^)(NSError *error))handler progress:(void (^)(float progress))exportProgress;
37 |
38 | @end
39 |
40 | NS_ASSUME_NONNULL_END
41 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/AV/SLAvPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAvPlayer.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/20.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @class SLAvPlayer;
16 | @protocol SLAvPlayerDelegate
17 | @optional
18 | /// 播放中
19 | /// @param avPlayer 播放器
20 | /// @param currentTime 当前时间
21 | /// @param totalTime 总时间
22 | - (void)avPlayer:(SLAvPlayer *)avPlayer playingToCurrentTime:(CMTime)currentTime totalTime:(CMTime)totalTime;
23 | /// 播放结束 暂停
24 | - (void)playDidEndOnAvplyer:(SLAvPlayer *)avPlayer;
25 | @end
26 |
27 | /// 简易播放器
28 | @interface SLAvPlayer : NSObject
29 | /// 播放源
30 | @property (nonatomic, strong) NSURL *url;
31 | /// 视频尺寸 单位像素 px
32 | @property (nonatomic, assign, readonly) CGSize naturalSize;
33 | /// 总时长
34 | @property (nonatomic, assign, readonly) CMTime duration;
35 | /// 视频展示区域 显示器
36 | @property (nonatomic, strong, nullable) UIView *monitor;
37 | /// 代理
38 | @property (nonatomic, weak) id delegate;
39 |
40 | + (instancetype)sharedAVPlayer;
41 | ///开始播放
42 | - (void)play;
43 | ///暂停
44 | - (void)pause;
45 | ///结束播放 销毁播放器
46 | - (void)stop;
47 | ///跳转到time节点并暂停
48 | - (void)seekToTime:(CMTime)time completionHandler:(void (^_Nullable)(BOOL finished))completionHandler;
49 | @end
50 |
51 | NS_ASSUME_NONNULL_END
52 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/AV/SLAvWriterInput.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAvWriterInput.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/7.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | /// 写入的音视频文件类型
13 | typedef NS_ENUM(NSUInteger, SLAvWriterFileType) {
14 | /// 音视频 默认
15 | SLAvWriterFileTypeVideo = 0,
16 | /// 无声视频
17 | SLAvWriterFileTypeSilentVideo,
18 | /// 音频
19 | SLAvWriterFileTypeAudio
20 | };
21 |
22 | @class SLAvWriterInput;
23 | /// 音视频写入完成
24 | @protocol SLAvWriterInputDelegate
25 | @optional
26 | /// 写入音视频完成,返回文件地址
27 | /// @param outputFileURL 文件地址
28 | /// @param error 错误信息
29 | - (void)writerInput:(SLAvWriterInput *_Nonnull)writerInput didFinishRecordingToOutputFileAtURL:(NSURL *_Nullable)outputFileURL error:(nullable NSError *)error;
30 | @end
31 |
32 | NS_ASSUME_NONNULL_BEGIN
33 |
34 | /// 写入音视频样本 生成文件
35 | @interface SLAvWriterInput : NSObject
36 |
37 | /// 视频宽高 默认设备宽高 已home键朝下为准
38 | @property (nonatomic, assign) CGSize videoSize;
39 | ///写入代理
40 | @property (nonatomic, weak) id delegate;
41 |
42 | // 开始写入 设置写入的输出文件地址和格式、设备方向
43 | - (void)startWritingToOutputFileAtPath:(NSString *)path fileType:(SLAvWriterFileType)fileType deviceOrientation:(UIDeviceOrientation)deviceOrientation;
44 | /// 实时写入视频样本 如果filterImage == nil,就表示不需要加滤镜
45 | - (void)writingVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection filterImage:(CIImage * _Nullable)filterImage;
46 | /// 实时写入音频样本
47 | - (void)writingAudioSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection;
48 | /// 完成写入
49 | - (void)finishWriting;
50 |
51 | @end
52 |
53 | NS_ASSUME_NONNULL_END
54 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/SLAnimateImageView/SLImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLImage.h
3 | // WSLImageView
4 | //
5 | // Created by 王双龙 on 2018/10/26.
6 | // Copyright © 2018年 https://www.jianshu.com/u/e15d1f644bea. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SLImageDecoder.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | //利用解码工具进行解码并存储解码后的信息
15 | @interface SLImage : UIImage
16 |
17 | /** 图片类型 */
18 | @property (nonatomic, assign, readonly) SLImageType imageType;
19 | /** 图像帧总个数 */
20 | @property (nonatomic, assign, readonly) NSInteger frameCount;
21 | /** 循环次数 0:无限循环 */
22 | @property (nonatomic, assign, readonly) NSInteger loopCount;
23 | /// 循环一次的时长
24 | @property (nonatomic, assign, readonly) NSTimeInterval totalTime;
25 | /** 图片所占的内存大小 */
26 | @property (nonatomic, readonly) NSUInteger animatedImageMemorySize;
27 | /** 是否预加载所有的帧 注意内存大小 默认NO */
28 | @property (nonatomic, assign) BOOL preloadAllAnimatedImageFrames;
29 |
30 | /**
31 | 重写系统方法,用法尽量和原来保持一致
32 | */
33 | + (SLImage *)imageNamed:(NSString *)name;
34 | + (SLImage *)imageWithContentsOfFile:(NSString *)path;
35 | + (SLImage *)imageWithData:(NSData *)data;
36 |
37 | /**
38 | 某一帧的图片信息:索引、持续时长、宽高、方向、解码后的image
39 | */
40 | - (SLImageFrame *)imageFrameAtIndex:(NSInteger)index;
41 | /**
42 | 动图中的某一帧image
43 | */
44 | - (UIImage *)imageAtIndex:(NSUInteger)index;
45 | /**
46 | 某一帧持续时长
47 | */
48 | - (NSTimeInterval)imageDurationAtIndex:(NSUInteger)index;
49 | /**
50 | 一帧所占的内存大小 假设每一帧大小相同
51 | */
52 | - (NSUInteger)imageFrameBytes;
53 |
54 | @end
55 |
56 | NS_ASSUME_NONNULL_END
57 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/SLAnimateImageView/SLImageView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLImageView.h
3 | // WSLImageView
4 | //
5 | // Created by 王双龙 on 2018/10/26.
6 | // Copyright © 2018年 https://www.jianshu.com/u/e15d1f644bea. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SLImage.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /// 支持gif/png/jpg 等图片
15 | @interface SLImageView : UIImageView
16 |
17 | /** 当前帧索引 默认从0开始 */
18 | @property (nonatomic, assign) NSUInteger currentImageIndex;
19 | /** 是否自动播放动图 默认YES */
20 | @property (nonatomic, assign) BOOL autoPlayAnimatedImage;
21 | /** 当前是否正在动画 */
22 | @property (nonatomic, readonly) BOOL currentIsPlaying;
23 | /** 设置帧缓冲池最大内存空间(字节B) 默认根据当前内存大小动态计算适合的缓存大小 */
24 | @property (nonatomic, assign) NSUInteger maxBufferSize;
25 | /// 图片类型
26 | @property (nonatomic, assign, readonly) SLImageType imageType;
27 | /// 当前动图
28 | @property (nonatomic, strong, readonly) SLImage *animatedImage;
29 |
30 |
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/SLAnimateImageView/WebP.framework/Headers/types.h:
--------------------------------------------------------------------------------
1 | // Copyright 2010 Google Inc. All Rights Reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style license
4 | // that can be found in the COPYING file in the root of the source
5 | // tree. An additional intellectual property rights grant can be found
6 | // in the file PATENTS. All contributing project authors may
7 | // be found in the AUTHORS file in the root of the source tree.
8 | // -----------------------------------------------------------------------------
9 | //
10 | // Common types
11 | //
12 | // Author: Skal (pascal.massimino@gmail.com)
13 |
14 | #ifndef WEBP_WEBP_TYPES_H_
15 | #define WEBP_WEBP_TYPES_H_
16 |
17 | #include // for size_t
18 |
19 | #ifndef _MSC_VER
20 | #include
21 | #if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \
22 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
23 | #define WEBP_INLINE inline
24 | #else
25 | #define WEBP_INLINE
26 | #endif
27 | #else
28 | typedef signed char int8_t;
29 | typedef unsigned char uint8_t;
30 | typedef signed short int16_t;
31 | typedef unsigned short uint16_t;
32 | typedef signed int int32_t;
33 | typedef unsigned int uint32_t;
34 | typedef unsigned long long int uint64_t;
35 | typedef long long int int64_t;
36 | #define WEBP_INLINE __forceinline
37 | #endif /* _MSC_VER */
38 |
39 | #ifndef WEBP_EXTERN
40 | // This explicitly marks library functions and allows for changing the
41 | // signature for e.g., Windows DLL builds.
42 | # if defined(__GNUC__) && __GNUC__ >= 4
43 | # define WEBP_EXTERN(type) extern __attribute__ ((visibility ("default"))) type
44 | # else
45 | # define WEBP_EXTERN(type) extern type
46 | # endif /* __GNUC__ >= 4 */
47 | #endif /* WEBP_EXTERN */
48 |
49 | // Macro to check ABI compatibility (same major revision number)
50 | #define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
51 |
52 | #endif /* WEBP_WEBP_TYPES_H_ */
53 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/SLAnimateImageView/WebP.framework/WebP:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/General/SLAnimateImageView/WebP.framework/WebP
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/General/Tool/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/5.
6 | // Copyright © 2019 https://github.com/wsl2ls/iOS_Tips.git All rights reserved.
7 | //
8 |
9 | #ifndef PrefixHeader_pch
10 | #define PrefixHeader_pch
11 |
12 | //如何安装:
13 | //1.创建新pch文件,默认名字即可: "PrefixHeader.pch".
14 | //2.点击下一步再去Build Settings 搜索Prefix Header.
15 | //3.找到Prefix Header并且双击,输入$(SRCROOT)/$(PROJECT_NAME)/PrefixHeader.pch
16 | //现在你可以在项目内任何文件调用宏定义了,祝一切顺利.
17 |
18 | #ifdef __OBJC__ // 只被object-c文件所引用
19 |
20 | #import "SLToolMacro.h"
21 |
22 |
23 | #import "UIView+SLFrame.h"
24 | #import "SLDelayPerform.h"
25 | #import "SLAlertView.h"
26 | #import "Masonry.h"
27 | #import "SLMethod.h"
28 | #import "SLViewController.h"
29 |
30 |
31 | #endif
32 |
33 | #endif /* PrefixHeader_pch */
34 |
35 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLDelayPerform.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLDelayPerform.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/28.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 延迟执行
14 | @interface SLDelayPerform : NSObject
15 | /// 开始延迟执行 每次调用就重新开始计时 用完记得 执行sl_cancelDelayPerform
16 | /// @param perform 执行内容
17 | /// @param delay 延迟时间
18 | + (void)sl_startDelayPerform:(void(^)(void))perform afterDelay:(NSTimeInterval)delay;
19 | ///取消延迟执行
20 | + (void)sl_cancelDelayPerform;
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLDelayPerform.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLDelayPerform.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/28.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLDelayPerform.h"
10 |
11 | //延迟执行的回调 静态全局变量
12 | static dispatch_block_t sl_delayBlock;
13 |
14 | @implementation SLDelayPerform
15 | /// 开始延迟执行 每次调用就重新开始计时 用完记得 执行sl_cancelDelayPerform
16 | /// @param perform 执行内容
17 | /// @param delay 延迟时间
18 | + (void)sl_startDelayPerform:(void(^)(void))perform afterDelay:(NSTimeInterval)delay {
19 | if (sl_delayBlock != nil) {
20 | dispatch_block_cancel(sl_delayBlock);
21 | sl_delayBlock = nil;
22 | }
23 | if (sl_delayBlock == nil) {
24 | sl_delayBlock = dispatch_block_create(DISPATCH_BLOCK_BARRIER, ^{
25 | perform();
26 | });
27 | }
28 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(),sl_delayBlock);
29 | }
30 | ///取消延迟执行
31 | + (void)sl_cancelDelayPerform {
32 | if (sl_delayBlock != nil) {
33 | dispatch_block_cancel(sl_delayBlock);
34 | sl_delayBlock = nil;
35 | }
36 | }
37 | @end
38 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLKeyChain.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLKeyChain.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/15.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | FOUNDATION_EXTERN NSString* const SLkeychainService;
14 |
15 | ///存储管理用户账号和密码到钥匙串
16 | @interface SLKeyChain : NSObject
17 |
18 | /// 保存用户信息到钥匙串中
19 | /// @param service 存储服务的key,一个service可以存储多个account/password键值对
20 | /// @param account 账号
21 | /// @param password 密码
22 | + (NSError *)saveKeychainWithService:(NSString *)service
23 | account:(NSString *)account
24 | password:(NSString *)password;
25 | ///从钥匙串中删除这条用户信息
26 | + (NSError *)deleteWithService:(NSString *)service
27 | account:(NSString *)account;
28 |
29 | ///查询用户信息 查到的结果存在NSError中
30 | + (NSError *)queryKeychainWithService:(NSString *)service
31 | account:(NSString *)account;
32 |
33 | ///更新钥匙串中的用户名和密码
34 | + (NSError *)updateKeychainWithService:(NSString *)service
35 | account:(NSString *)account
36 | password:(NSString *)password;
37 |
38 | @end
39 |
40 | NS_ASSUME_NONNULL_END
41 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLMethod.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLMethod.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/4/24.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | //四个圆角半径
14 | struct SLCornerRadii {
15 | CGFloat topLeft; //左上
16 | CGFloat topRight; //右上
17 | CGFloat bottomLeft; //左下
18 | CGFloat bottomRight; //右下
19 | };
20 | typedef struct CG_BOXABLE SLCornerRadii SLCornerRadii;
21 | //SLCornerRadii初始化函数
22 | CG_INLINE SLCornerRadii SLCornerRadiiMake(CGFloat topLeft,CGFloat topRight,CGFloat bottomLeft,CGFloat bottomRight){
23 | return (SLCornerRadii){
24 | topLeft,
25 | topRight,
26 | bottomLeft,
27 | bottomRight,
28 | };
29 | }
30 |
31 | static NSString * const SLUserDefaultsKey = @"SLUserDefaultsKey";
32 |
33 | /// 辅助公共方法集合
34 | @interface SLMethod : NSObject
35 |
36 | /// 以SLUserDefaultsKey为根key,统一管理userDefaults存储的数据
37 | + (void)userDefaultsSetObject:(nullable id)value forKey:(NSString *)key;
38 | + (id)userDefaultsObjectForKey:(NSString *)key;
39 |
40 | /**
41 | * 动态计算文字的宽高
42 | * @param text 文字
43 | * @param font 文字的font
44 | * @param maxSize 最大 size
45 | * @return 返回text的size
46 | */
47 | + (CGSize)sizeFromText:(NSString *)text textFont:(UIFont *)font maxSize:(CGSize)maxSize;
48 |
49 | /**
50 | 动态计算属性字符串的宽高
51 |
52 | @param attributedText 属性字符串
53 | @param maxSize 最大 size
54 | @return 返回属性字符串的size
55 | */
56 | + (CGSize)sizeFromAttributedText:(NSAttributedString *)attributedText maxSize:(CGSize)maxSize;
57 |
58 | /// 切四个不同半径圆角的函数
59 | /// @param bounds 区域
60 | /// @param cornerRadii 四个圆角的半径
61 | + (CGPathRef)cornerPathCreateWithRoundedRect:(CGRect)bounds cornerRadii:(SLCornerRadii)cornerRadii;
62 |
63 | @end
64 |
65 | NS_ASSUME_NONNULL_END
66 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLNavigationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLNavigationController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/11.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLNavigationController : UINavigationController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLNavigationController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLNavigationController.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/11.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLNavigationController.h"
10 |
11 | @interface SLNavigationController ()
12 |
13 | @end
14 |
15 | @implementation SLNavigationController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.view.backgroundColor =[UIColor clearColor];
20 |
21 | // 获取系统自带滑动手势的target对象
22 | id target = self.interactivePopGestureRecognizer.delegate;
23 | // 创建全屏滑动手势,调用系统自带滑动手势的target的action方法
24 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:target action:@selector(handleNavigationTransition:)];
25 | // 设置手势代理,拦截手势触发
26 | pan.delegate = self;
27 | // 给导航控制器的view添加全屏滑动手势
28 | [self.view addGestureRecognizer:pan];
29 | // 禁止使用系统自带的pop滑动手势
30 | self.interactivePopGestureRecognizer.enabled = NO;
31 | }
32 |
33 | #pragma mark -- UIGestureRecognizerDelegate
34 |
35 | // 什么时候调用:每次触发手势之前都会询问下代理,是否触发。
36 | // 作用:拦截手势触发
37 | - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
38 | // 注意:只有非根控制器才有滑动返回功能,根控制器没有。
39 | // 判断导航控制器是否只有一个子控制器,如果只有一个子控制器,肯定是根控制器
40 | if (self.childViewControllers.count == 1 ) {
41 | // 表示用户在根控制器界面,就不需要触发滑动手势,
42 | return NO;
43 | }
44 | return YES;
45 | }
46 | //触发之后是否响应手势事件
47 | //处理侧滑返回与UISlider的拖动手势冲突
48 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
49 | //如果手势是触摸的UISlider滑块触发的,侧滑返回手势就不响应
50 | if ([touch.view isKindOfClass:[UISlider class]]) {
51 | return NO;
52 | }
53 | return YES;
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLProxy.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/14.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///消息转发中介 主要解决NSTimer、CADisplayLink等循环引用问题
14 | @interface SLProxy : NSProxy
15 | ///初始化方法
16 | + (instancetype)proxyWithTarget:(id)target;
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLTimer.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLTimer.h
3 | //
4 | // Created by wsl on 2020/6/15.
5 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
6 | //
7 |
8 |
9 | #import
10 |
11 | ///计时器 比NSTimer和CADisplayLink计时准确
12 | @interface SLTimer : NSObject
13 |
14 | /// 执行任务 返回任务名称
15 | /// @param task 任务Block
16 | /// @param start 开始时间
17 | /// @param interval 时间间隔
18 | /// @param repeats 是否重复
19 | /// @param async 是否异步
20 | + (NSString *)execTask:(void(^)(void))task
21 | start:(NSTimeInterval)start
22 | interval:(NSTimeInterval)interval
23 | repeats:(BOOL)repeats
24 | async:(BOOL)async;
25 |
26 | /// 执行任务 返回任务名称
27 | /// @param target 选择器执行者
28 | /// @param selector 选择器
29 | /// @param start 开始时间
30 | /// @param interval 时间间隔
31 | /// @param repeats 是否重复
32 | /// @param async 是否异步
33 | + (NSString *)execTask:(id)target
34 | selector:(SEL)selector
35 | start:(NSTimeInterval)start
36 | interval:(NSTimeInterval)interval
37 | repeats:(BOOL)repeats
38 | async:(BOOL)async;
39 |
40 | /// 取消任务
41 | /// @param taskName 任务名称
42 | + (void)cancelTask:(NSString *)taskName;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/12.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLViewController : UIViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/Tool/SLViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLViewController.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/12.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLViewController.h"
10 |
11 | @interface SLViewController ()
12 |
13 | @end
14 |
15 | @implementation SLViewController
16 | - (void)dealloc {
17 | NSLog(@"%@释放了",NSStringFromClass(self.class));
18 | }
19 | @end
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLAlertView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAlertView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/3/11.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface SLAlertView : NSObject
15 | /// 展示几秒后自动隐藏
16 | /// @param text 文本
17 | /// @param delay 展示时长
18 | + (void)showAlertViewWithText:(NSString *)text delayHid:(NSTimeInterval)delay;
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLAlertView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLAlertView.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/3/11.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLAlertView.h"
10 |
11 | @interface SLAlertView ()
12 | @end
13 |
14 | @implementation SLAlertView
15 | /// 展示几秒后自动隐藏
16 | /// @param text 文本
17 | /// @param delay 展示时长
18 | + (void)showAlertViewWithText:(NSString *)text delayHid:(NSTimeInterval)delay {
19 | MBProgressHUD *progressHUD = [[MBProgressHUD alloc] initWithView:[UIApplication sharedApplication].keyWindow];
20 | progressHUD.animationType = MBProgressHUDAnimationFade;
21 | progressHUD.mode = MBProgressHUDModeText;
22 | progressHUD.label.text = text;
23 | progressHUD.label.numberOfLines = 0;
24 | [[UIApplication sharedApplication].keyWindow addSubview:progressHUD];
25 | [progressHUD showAnimated:YES];
26 | [progressHUD hideAnimated:YES afterDelay:delay];
27 | }
28 | @end
29 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLBlurView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLBlurView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/19.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 高斯模糊视图
14 | @interface SLBlurView : UIView
15 | //高斯模糊
16 | @property (nonatomic, strong) UIVisualEffectView *blurView;
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLBlurView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLBlurView.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/19.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import "SLBlurView.h"
10 |
11 | @implementation SLBlurView
12 |
13 | /*
14 | Only override drawRect: if you perform custom drawing.
15 | An empty implementation adversely affects performance during animation.
16 | */
17 |
18 | - (instancetype)initWithFrame:(CGRect)frame {
19 | self = [super initWithFrame:frame];
20 | if (self) {
21 | self.clipsToBounds = YES;
22 | self.userInteractionEnabled = YES;
23 | [self addSubview:self.blurView];
24 | }
25 | return self;
26 | }
27 |
28 | - (instancetype)init {
29 | self = [super init];
30 | if (self) {
31 | self.clipsToBounds = YES;
32 | self.userInteractionEnabled = YES;
33 | [self addSubview:self.blurView];
34 | }
35 | return self;
36 | }
37 |
38 | - (UIVisualEffectView *)blurView {
39 | if (_blurView == nil) {
40 | //高斯模糊
41 | UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
42 | _blurView = [[UIVisualEffectView alloc] initWithEffect:blur];
43 | _blurView.alpha = 0.9;
44 | _blurView.frame = self.bounds;
45 | }
46 | return _blurView;
47 | }
48 |
49 | - (void)layoutSubviews {
50 | [self sendSubviewToBack:self.blurView];
51 | self.blurView.frame = self.bounds;
52 | }
53 |
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLButton.h
3 | //
4 | // Created by wsl on 2020/4/23.
5 | // Copyright © 2020 wsl. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | typedef NS_ENUM(NSUInteger, SLButtonStyle) {
13 | SLButtonStyleImageLeft = 0,// 左图右文
14 | SLButtonStyleImageRight, //右图左文
15 | SLButtonStyleImageTop, //上图下文
16 | SLButtonStyleImageBottom //下图上文
17 | };
18 |
19 | /// 自定义Button 自定义文本和图片布局样式
20 | @interface SLButton : UIControl
21 | @property (nonatomic, strong) UIImageView *imageView;
22 | @property (nonatomic, strong) UILabel *titleLabel;
23 | ///设置文本图片布局方式
24 | - (void)setTitleImageLayoutStyle:(SLButtonStyle)titleImageStyle space:(CGFloat)space;
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLPaddingLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLPaddingLabel.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/19.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 可以设置内边距的Label
14 | @interface SLPaddingLabel : UILabel
15 | /// 内边距
16 | @property (nonatomic, assign) UIEdgeInsets textPadding;
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/General/UI/SLPaddingLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLPaddingLabel.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/19.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import "SLPaddingLabel.h"
10 |
11 | @implementation SLPaddingLabel
12 | - (void)drawTextInRect:(CGRect)rect {
13 | [super drawTextInRect:UIEdgeInsetsInsetRect(rect, _textPadding)];
14 | }
15 | - (void)setTextPadding:(UIEdgeInsets)textPadding {
16 | _textPadding = textPadding;
17 | [self setNeedsLayout];
18 | }
19 | @end
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/OpenGL/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLCubeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLCubeViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/29.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// GLKit 绘制正方体
14 | @interface SLCubeViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLGLKPyramidVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLGLKPyramidVC.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/5.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// GLKit 绘制 颜色和纹理混合金字塔
14 | @interface SLGLKPyramidVC : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLLoadImageVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLLoadImageVC.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/29.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /// GLKit 加载图片
15 | @interface SLLoadImageVC : GLKViewController
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLMixColorTextureVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLMixColorTextureVC.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/5.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// GLSL 颜色和纹理混合 金字塔
14 | @interface SLMixColorTextureVC : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLOpenGLController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLOpenGLController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/11/28.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// OpenGL - ES 学习 目录列表
14 | @interface SLOpenGLController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderCubeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLShaderCubeViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/4.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///GLSL 渲染三角锥立方体/ 金字塔
14 | @interface SLShaderCubeViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderFilterViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLFilterViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/9.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// GLSL 滤镜集合 灰度、马赛克、旋涡
14 | @interface SLShaderFilterViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderLanguageViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLShaderLanguageViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/2.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///GLSL 自定义着色器 ShaderLanguage 加载纹理图片
14 | @interface SLShaderLanguageViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLSpecialEffectsViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLSpecialEffectsViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/9.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///GLSL 抖音部分特效集合
14 | @interface SLSpecialEffectsViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/Controller/SLSplitScreenViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLSplitScreenViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/9.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// GLSL 分屏滤镜
14 | @interface SLSplitScreenViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Cirlce.fsh:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | const float PI = 3.14159265;
4 | uniform sampler2D Texture;
5 |
6 | const float uD = 80.0;
7 | const float uR = 0.5;
8 |
9 | varying vec2 TextureCoordsVarying;
10 |
11 | void main()
12 | {
13 | ivec2 ires = ivec2(512, 512);
14 | float Res = float(ires.s);
15 |
16 | vec2 st = TextureCoordsVarying;
17 | float Radius = Res * uR;
18 |
19 | vec2 xy = Res * st;
20 |
21 | vec2 dxy = xy - vec2(Res/2., Res/2.);
22 | float r = length(dxy);
23 |
24 | //(1.0 - r/Radius);
25 | float beta = atan(dxy.y, dxy.x) + radians(uD) * 2.0 * (-(r/Radius)*(r/Radius) + 1.0);
26 |
27 | vec2 xy1 = xy;
28 | if(r<=Radius)
29 | {
30 | xy1 = Res/2. + r*vec2(cos(beta), sin(beta));
31 | }
32 |
33 | st = xy1/Res;
34 |
35 | vec3 irgb = texture2D(Texture, st).rgb;
36 |
37 | gl_FragColor = vec4( irgb, 1.0 );
38 | }
39 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Cirlce.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Glitch.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 |
3 | uniform sampler2D Texture;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | uniform float Time;
7 |
8 | const float PI = 3.1415926;
9 |
10 | float rand(float n) {
11 | return fract(sin(n) * 43758.5453123);
12 | }
13 |
14 | void main (void) {
15 | float maxJitter = 0.06;
16 | float duration = 0.3;
17 | float colorROffset = 0.01;
18 | float colorBOffset = -0.025;
19 |
20 | float time = mod(Time, duration * 2.0);
21 | float amplitude = max(sin(time * (PI / duration)), 0.0);
22 |
23 | float jitter = rand(TextureCoordsVarying.y) * 2.0 - 1.0; // -1~1
24 | bool needOffset = abs(jitter) < maxJitter * amplitude;
25 |
26 | float textureX = TextureCoordsVarying.x + (needOffset ? jitter : (jitter * amplitude * 0.006));
27 | vec2 textureCoords = vec2(textureX, TextureCoordsVarying.y);
28 |
29 | vec4 mask = texture2D(Texture, textureCoords);
30 | vec4 maskR = texture2D(Texture, textureCoords + vec2(colorROffset * amplitude, 0.0));
31 | vec4 maskB = texture2D(Texture, textureCoords + vec2(colorBOffset * amplitude, 0.0));
32 |
33 | gl_FragColor = vec4(maskR.r, mask.g, maskB.b, mask.a);
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Glitch.vsh:
--------------------------------------------------------------------------------
1 | attribute vec4 Position;
2 | attribute vec2 TextureCoords;
3 | varying vec2 TextureCoordsVarying;
4 |
5 | void main (void) {
6 | gl_Position = Position;
7 | TextureCoordsVarying = TextureCoords;
8 | }
9 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Gray.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying vec2 TextureCoordsVarying;
4 | const highp vec3 W = vec3(0.2125, 0.7154, 0.0721);
5 |
6 | void main (void) {
7 |
8 | vec4 mask = texture2D(Texture, TextureCoordsVarying);
9 | float luminance = dot(mask.rgb, W);
10 | gl_FragColor = vec4(vec3(luminance), 1.0);
11 | }
12 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Gray.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/HexagonMosaic.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying vec2 TextureCoordsVarying;
4 |
5 | const float mosaicSize = 0.03;
6 |
7 | void main (void)
8 | {
9 | float length = mosaicSize;
10 | float TR = 0.866025;
11 |
12 | float x = TextureCoordsVarying.x;
13 | float y = TextureCoordsVarying.y;
14 |
15 | int wx = int(x / 1.5 / length);
16 | int wy = int(y / TR / length);
17 | vec2 v1, v2, vn;
18 |
19 |
20 | if (wx/2 * 2 == wx) {
21 | if (wy/2 * 2 == wy) {
22 | v1 = vec2(length * 1.5 * float(wx), length * TR * float(wy));
23 | v2 = vec2(length * 1.5 * float(wx + 1), length * TR * float(wy + 1));
24 | } else {
25 |
26 | v1 = vec2(length * 1.5 * float(wx), length * TR * float(wy + 1));
27 | v2 = vec2(length * 1.5 * float(wx + 1), length * TR * float(wy));
28 | }
29 | }else {
30 | if (wy/2 * 2 == wy) {
31 | v1 = vec2(length * 1.5 * float(wx), length * TR * float(wy + 1));
32 | v2 = vec2(length * 1.5 * float(wx + 1), length * TR * float(wy));
33 | } else {
34 | v1 = vec2(length * 1.5 * float(wx), length * TR * float(wy));
35 | v2 = vec2(length * 1.5 * float(wx + 1), length * TR * float(wy + 1));
36 | }
37 | }
38 |
39 | float s1 = sqrt(pow(v1.x - x, 2.0) + pow(v1.y - y, 2.0));
40 | float s2 = sqrt(pow(v2.x - x, 2.0) + pow(v2.y - y, 2.0));
41 | if (s1 < s2) {
42 | vn = v1;
43 | } else {
44 | vn = v2;
45 | }
46 | vec4 color = texture2D(Texture, vn);
47 |
48 | gl_FragColor = color;
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/HexagonMosaic.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Mosaic.fsh:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec2 TextureCoordsVarying;
4 | uniform sampler2D Texture;
5 | const vec2 TexSize = vec2(400.0, 400.0);
6 | const vec2 mosaicSize = vec2(16.0, 16.0);
7 |
8 | void main()
9 | {
10 | vec2 intXY = vec2(TextureCoordsVarying.x*TexSize.x, TextureCoordsVarying.y*TexSize.y);
11 |
12 | vec2 XYMosaic = vec2(floor(intXY.x/mosaicSize.x)*mosaicSize.x, floor(intXY.y/mosaicSize.y)*mosaicSize.y);
13 |
14 | vec2 UVMosaic = vec2(XYMosaic.x/TexSize.x, XYMosaic.y/TexSize.y);
15 | vec4 color = texture2D(Texture, UVMosaic);
16 | gl_FragColor = color;
17 | }
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Mosaic.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Scale.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 |
3 | uniform sampler2D Texture;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | vec4 mask = texture2D(Texture, TextureCoordsVarying);
8 | gl_FragColor = vec4(mask.rgb, 1.0);
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Scale.vsh:
--------------------------------------------------------------------------------
1 | attribute vec4 Position;
2 | attribute vec2 TextureCoords;
3 | varying vec2 TextureCoordsVarying;
4 |
5 | uniform float Time;
6 |
7 | const float PI = 3.1415926;
8 |
9 | void main (void) {
10 | float duration = 0.6;
11 | float maxAmplitude = 0.3;
12 |
13 | float time = mod(Time, duration);
14 | float amplitude = 1.0 + maxAmplitude * abs(sin(time * (PI / duration)));
15 |
16 | gl_Position = vec4(Position.x * amplitude, Position.y * amplitude, Position.zw);
17 | TextureCoordsVarying = TextureCoords;
18 | }
19 |
20 |
21 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Shake.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 |
3 | uniform sampler2D Texture;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | uniform float Time;
7 |
8 | void main (void) {
9 | float duration = 0.7;
10 | float maxScale = 1.1;
11 | float offset = 0.02;
12 |
13 | float progress = mod(Time, duration) / duration; // 0~1
14 | vec2 offsetCoords = vec2(offset, offset) * progress;
15 | float scale = 1.0 + (maxScale - 1.0) * progress;
16 |
17 | vec2 ScaleTextureCoords = vec2(0.5, 0.5) + (TextureCoordsVarying - vec2(0.5, 0.5)) / scale;
18 |
19 | vec4 maskR = texture2D(Texture, ScaleTextureCoords + offsetCoords);
20 | vec4 maskB = texture2D(Texture, ScaleTextureCoords - offsetCoords);
21 | vec4 mask = texture2D(Texture, ScaleTextureCoords);
22 |
23 | gl_FragColor = vec4(maskR.r, mask.g, maskB.b, mask.a);
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/Shake.vsh:
--------------------------------------------------------------------------------
1 | attribute vec4 Position;
2 | attribute vec2 TextureCoords;
3 | varying vec2 TextureCoordsVarying;
4 |
5 | void main (void) {
6 | gl_Position = Position;
7 | TextureCoordsVarying = TextureCoords;
8 | }
9 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SoulOut.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 |
3 | uniform sampler2D Texture;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | uniform float Time;
7 |
8 | void main (void) {
9 | float duration = 0.7;
10 | float maxAlpha = 0.4;
11 | float maxScale = 1.8;
12 |
13 | float progress = mod(Time, duration) / duration; // 0~1
14 | float alpha = maxAlpha * (1.0 - progress);
15 | float scale = 1.0 + (maxScale - 1.0) * progress;
16 |
17 | float weakX = 0.5 + (TextureCoordsVarying.x - 0.5) / scale;
18 | float weakY = 0.5 + (TextureCoordsVarying.y - 0.5) / scale;
19 | vec2 weakTextureCoords = vec2(weakX, weakY);
20 |
21 | vec4 weakMask = texture2D(Texture, weakTextureCoords);
22 |
23 | vec4 mask = texture2D(Texture, TextureCoordsVarying);
24 |
25 | gl_FragColor = mask * (1.0 - alpha) + weakMask * alpha;
26 | }
27 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SoulOut.vsh:
--------------------------------------------------------------------------------
1 | attribute vec4 Position;
2 | attribute vec2 TextureCoords;
3 | varying vec2 TextureCoordsVarying;
4 |
5 | void main (void) {
6 | gl_Position = Position;
7 | TextureCoordsVarying = TextureCoords;
8 | }
9 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_1.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying vec2 TextureCoordsVarying;
4 |
5 | void main (void) {
6 | vec4 mask = texture2D(Texture, TextureCoordsVarying);
7 | gl_FragColor = vec4(mask.rgb, 1.0);
8 | }
9 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_1.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_16.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying highp vec2 TextureCoordsVarying;
4 |
5 | void main() {
6 | vec2 uv = TextureCoordsVarying.xy;
7 | if(uv.x <= 1.0 / 4.0){
8 | uv.x = uv.x + 3.0/8.0;
9 | }else if(uv.x > 1.0/4.0 && uv.x <= 2.0/4.0){
10 | uv.x = uv.x + 1.0/8.0;
11 | }else if(uv.x > 2.0/4.0 && uv.x <= 3.0/4.0){
12 | uv.x = uv.x - 1.0/8.0;
13 | }else {
14 | uv.x = uv.x - 3.0/8.;
15 | }
16 |
17 | if(uv.y <= 1.0 / 4.0){
18 | uv.y = uv.y + 3.0/8.0 ;
19 | }else if(uv.y > 1.0/4.0 && uv.y <= 2.0/4.0){
20 | uv.y = uv.y + 1.0/8.0;
21 | }else if(uv.y > 2.0/4.0 && uv.y <= 3.0/4.0){
22 | uv.y = uv.y - 1.0/8.0;
23 | }else {
24 | uv.y = uv.y - 3.0/8.0;
25 | }
26 | gl_FragColor = texture2D(Texture, uv);
27 | }
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_16.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_2.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying highp vec2 TextureCoordsVarying;
4 |
5 | void main() {
6 | vec2 uv = TextureCoordsVarying.xy;
7 | float y;
8 | if (uv.y >= 0.0 && uv.y <= 0.5) {
9 | y = uv.y + 0.25;
10 | } else {
11 | y = uv.y - 0.25;
12 | }
13 | gl_FragColor = texture2D(Texture, vec2(uv.x, y));
14 | }
15 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_2.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_3.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying highp vec2 TextureCoordsVarying;
4 |
5 | void main() {
6 | vec2 uv = TextureCoordsVarying.xy;
7 | if (uv.y < 1.0/3.0) {
8 | uv.y = uv.y + 1.0/3.0;
9 | } else if (uv.y > 2.0/3.0){
10 | uv.y = uv.y - 1.0/3.0;
11 | }
12 | gl_FragColor = texture2D(Texture, uv);
13 | }
14 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_3.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_4.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying highp vec2 TextureCoordsVarying;
4 |
5 | void main() {
6 | vec2 uv = TextureCoordsVarying.xy;
7 | if(uv.x <= 0.5){
8 | uv.x = uv.x * 2.0;
9 | }else{
10 | uv.x = (uv.x - 0.5) * 2.0;
11 | }
12 |
13 | if (uv.y<= 0.5) {
14 | uv.y = uv.y * 2.0;
15 | }else{
16 | uv.y = (uv.y - 0.5) * 2.0;
17 | }
18 |
19 | gl_FragColor = texture2D(Texture, uv);
20 | }
21 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_4.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_6.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying highp vec2 TextureCoordsVarying;
4 |
5 | void main() {
6 | vec2 uv = TextureCoordsVarying.xy;
7 |
8 | if(uv.x <= 1.0 / 3.0){
9 | uv.x = uv.x + 1.0/3.0;
10 | }else if(uv.x >= 2.0/3.0){
11 | uv.x = uv.x - 1.0/3.0;
12 | }
13 |
14 | if(uv.y <= 0.5){
15 | uv.y = uv.y + 0.25;
16 | }else {
17 | uv.y = uv.y - 0.25;
18 | }
19 |
20 |
21 | gl_FragColor = texture2D(Texture, uv);
22 | }
23 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_6.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_9.fsh:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | uniform sampler2D Texture;
3 | varying highp vec2 TextureCoordsVarying;
4 |
5 | void main() {
6 | vec2 uv = TextureCoordsVarying.xy;
7 | if(uv.x <= 1.0 / 3.0){
8 | uv.x = uv.x + 1.0/3.0;
9 | }else if(uv.x > 1.0/3.0 && uv.x <= 2.0/3.0){
10 | uv.x = uv.x;
11 | }else {
12 | uv.x = uv.x - 1.0/3.0;
13 | }
14 |
15 | if(uv.y <= 1.0 / 3.0){
16 | uv.y = uv.y + 1.0/3.0;
17 | }else if(uv.y > 1.0/3.0 && uv.y <= 2.0/3.0){
18 | uv.y = uv.y;
19 | }else {
20 | uv.y = uv.y - 1.0/3.0;
21 | }
22 | gl_FragColor = texture2D(Texture, uv);
23 | }
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/SplitScreen_9.vsh:
--------------------------------------------------------------------------------
1 |
2 | attribute vec4 Position;
3 | attribute vec2 TextureCoords;
4 | varying vec2 TextureCoordsVarying;
5 |
6 | void main (void) {
7 | gl_Position = Position;
8 | TextureCoordsVarying = TextureCoords;
9 | }
10 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/shaderf.fsh:
--------------------------------------------------------------------------------
1 | varying lowp vec2 varyTextCoord;
2 | uniform sampler2D colorMap;
3 |
4 | void main()
5 | {
6 | gl_FragColor = texture2D(colorMap, varyTextCoord);
7 |
8 | }
9 |
10 | // 后缀.vsh(顶点着色器)和.fsh(片元着色器) 是可以自定义的,只是为了区分和管理顶点着色器和片元着色器,也可以用字符串存储
11 | // colorMap 采样器
12 | // varyTextCoord 纹理坐标 由顶点着色器传入,必须和.vsh(顶点着色器)的变量保持一致
13 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/shaderv.vsh:
--------------------------------------------------------------------------------
1 | attribute vec4 position; //顶点坐标
2 | attribute vec2 textCoordinate; //纹理坐标
3 | varying lowp vec2 varyTextCoord; //纹理坐标 传递给片元着色器
4 |
5 | void main()
6 | {
7 | varyTextCoord = textCoordinate;
8 | gl_Position = position;
9 | }
10 |
11 | // 后缀.vsh和.fsh 是可以自定义的,只是为了区分和管理顶点着色器和片元着色器,也可以用字符串存储
12 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/View/SLSplitScreenCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLSplitScreenCell.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/9.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | typedef struct {
15 | GLKVector3 positionCoord; // 顶点坐标
16 | GLKVector2 textureCoord; // 纹理坐标
17 | } SLSenceVertex;
18 |
19 | /// 分屏个数选择
20 | @interface SLSplitScreenCell : UICollectionViewCell
21 |
22 | @property (nonatomic, strong) NSString *title;
23 | @property (nonatomic, assign) BOOL isSelect;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/OpenGL/View/SLSplitScreenCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLSplitScreenCell.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/12/9.
6 | // Copyright © 2019 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLSplitScreenCell.h"
10 |
11 | @interface SLSplitScreenCell ()
12 | @property (nonatomic, strong) UILabel *label;
13 | @end
14 |
15 | @implementation SLSplitScreenCell
16 |
17 | - (instancetype)initWithFrame:(CGRect)frame {
18 | self = [super initWithFrame:frame];
19 | if (self) {
20 | [self commonInit];
21 | }
22 | return self;
23 | }
24 |
25 | - (void)layoutSubviews {
26 | [super layoutSubviews];
27 | self.label.frame = CGRectInset(self.label.frame, 0, 0);
28 | }
29 |
30 | - (void)commonInit {
31 | self.label = [[UILabel alloc] initWithFrame:self.bounds];
32 | self.label.textAlignment = NSTextAlignmentCenter;
33 | self.label.font = [UIFont boldSystemFontOfSize:15];
34 | self.label.numberOfLines = 0;
35 | [self addSubview:self.label];
36 | }
37 |
38 | - (void)setTitle:(NSString *)title {
39 | _title = title;
40 | self.label.text = title;
41 | }
42 | - (void)setIsSelect:(BOOL)isSelect {
43 | _isSelect = isSelect;
44 | self.label.backgroundColor = isSelect ? [UIColor blackColor] : [UIColor orangeColor];
45 | self.label.textColor = isSelect ? [UIColor whiteColor] : [UIColor blackColor];
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/.DS_Store
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/Audio/The love of one's life.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/Audio/The love of one's life.mp3
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/lf.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/lf.jpeg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/lufei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/lufei.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/素材1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/素材1.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/素材2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/Images/素材2.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_0.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_1.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_10.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_11.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_11.jpeg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_12.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_13.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_13.jpeg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_14.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_14.jpeg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_15.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_15.jpeg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_16.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_17.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_17.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_18.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_18.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_19.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_19.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_2.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_3.jpeg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_4.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_5.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_6.jpg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_7.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_8.jpg
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/Recource/Resources.bundle/StickingImages/stickers_9.gif
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+SLExtension.h
3 | //
4 | //
5 | // Created by wsl on 2020/6/18.
6 | // Copyright © 2020 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSDictionary (SLExtension)
14 |
15 | ///容错处理 value 应为NSString
16 | - (NSString *)sl_decodeStringFormDictWithKey:(NSString *)key;
17 | ///容错处理 value 为NSArray
18 | - (NSArray *)sl_decodeArrayFormDictWithKey:(NSString *)key;
19 | ///容错处理 value 为NSDictionary
20 | - (NSDictionary *)sl_decodeDictionaryFormDictWithKey:(NSString *)key;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+SLExtension.m
3 | //
4 | //
5 | // Created by wsl on 2020/6/18.
6 | // Copyright © 2020 wsl. All rights reserved.
7 | //
8 |
9 | #import "NSDictionary+SLExtension.h"
10 |
11 | @implementation NSDictionary (SLExtension)
12 |
13 | ///value 为NSString
14 | - (NSString *)sl_decodeStringFormDictWithKey:(NSString *)key {
15 | NSString *string = @"";
16 | if (self && [self isKindOfClass:[NSDictionary class]]) {
17 | NSDictionary *dict = (NSDictionary *)self;
18 | if ([dict[key] isKindOfClass:[NSString class]]) {
19 | string = dict[key];
20 | }
21 | else if ([dict[key] isKindOfClass:[NSNumber class]]) {
22 | string = [dict[key] stringValue];
23 | }
24 | }
25 | return string;
26 | }
27 | ///value 为NSArray
28 | - (NSArray *)sl_decodeArrayFormDictWithKey:(NSString *)key {
29 |
30 | NSArray *array = [NSArray array];
31 | if (self && [self isKindOfClass:[NSDictionary class]]) {
32 | NSDictionary *dict = (NSDictionary *)self;
33 | if ([dict[key] isKindOfClass:[NSArray class]]) {
34 | array = dict[key];
35 | }
36 | }
37 | return array;
38 | }
39 | ///容错处理 value 为NSDictionary
40 | - (NSDictionary *)sl_decodeDictionaryFormDictWithKey:(NSString *)key {
41 | NSDictionary *dictionary = [NSDictionary dictionary];
42 | if (self && [self isKindOfClass:[NSDictionary class]]) {
43 | NSDictionary *dict = (NSDictionary *)self;
44 | if ([dict[key] isKindOfClass:[NSDictionary class]]) {
45 | dictionary = dict[key];
46 | }
47 | }
48 | return dictionary;
49 | }
50 | @end
51 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIButton+SLTitleImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+SLTitleImage.h
3 | // ZGEBook
4 | //
5 | // Created by wsl on 2020/4/22.
6 | // Copyright © 2020 ZGEBook. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef NS_ENUM(NSUInteger, SLTitleImageStyle) {
14 | SLTitleImageStyleImageLeft = 0,// 左图右文
15 | SLTitleImageStyleImageRight, //右图左文
16 | SLTitleImageStyleImageTop, //上图下文
17 | SLTitleImageStyleImageBottom //下图上文
18 | };
19 |
20 | /// 设置文本和图片的位置
21 | @interface UIButton (SLTitleImage)
22 | ///设置文本图片布局方式
23 | - (void)sl_setTitleImageLayoutStyle:(SLTitleImageStyle)titleImageStyle space:(CGFloat)space;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIColor+SLCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+SLCommon.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/10.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UIColor (SLCommon)
14 |
15 | /// 根据16进制颜色值返回UIColor
16 | /// @param hexValue 16进制值
17 | /// @param alpha 透明度
18 | + (UIColor *)sl_colorWithHex:(int)hexValue alpha:(CGFloat)alpha;
19 |
20 | /// 根据UIColor实例获得RGBA的值
21 | /// @param color UIColor实例
22 | + (NSArray *)sl_rgbaValueWithColor:(UIColor *)color;
23 |
24 | /// 根据UIColor实例返回16进制颜色值
25 | /// @param color UIColor实例
26 | + (int)sl_hexValueWithColor:(UIColor *)color;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIColor+SLCommon.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+SLCommon.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/10.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "UIColor+SLCommon.h"
10 |
11 | @implementation UIColor (SLCommon)
12 |
13 | /// 根据16进制颜色值返回UIColor
14 | /// @param hexValue 16进制值
15 | /// @param alpha 透明度
16 | + (UIColor *)sl_colorWithHex:(int)hexValue alpha:(CGFloat)alpha{
17 | return [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blue:((float)(hexValue & 0xFF))/255.0 alpha:alpha];
18 | }
19 |
20 | /// 根据UIColor实例获得RGBA的值
21 | /// @param color UIColor实例
22 | + (NSArray *)sl_rgbaValueWithColor:(UIColor *)color {
23 | NSInteger numComponents = CGColorGetNumberOfComponents(color.CGColor);
24 | NSArray *array = nil;
25 | if (numComponents == 4) {
26 | const CGFloat *components = CGColorGetComponents(color.CGColor);
27 | array = @[@((int)(components[0] * 255)),
28 | @((int)(components[1] * 255)),
29 | @((int)(components[2] * 255)),
30 | @(components[3])];
31 | }
32 | return array;
33 | }
34 |
35 | /// 根据UIColor实例返回16进制颜色值
36 | /// @param color UIColor实例
37 | + (int)sl_hexValueWithColor:(UIColor *)color {
38 | NSArray *rgba = [UIColor sl_rgbaValueWithColor:color];
39 | if (rgba.count == 4) {
40 | return (([rgba[0] intValue] << 16) | ([rgba[1] intValue] << 8) | [rgba[2] intValue]);
41 | }
42 | return 0x000000;
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+SLCommon.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/25.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 通用方法分类
14 | @interface UIImage (SLCommon)
15 |
16 | /// 将图片旋转弧度radians
17 | - (UIImage *)sl_imageRotatedByRadians:(CGFloat)radians;
18 |
19 | /// 提取图片上某位置像素的颜色
20 | - (UIColor *)sl_colorAtPixel:(CGPoint)point;
21 |
22 | /// 图片缩放,针对大图片处理
23 | + (UIImage *)sl_scaledImageWithData:(NSData *)data withSize:(CGSize)size scale:(CGFloat)scale orientation:(UIImageOrientation)orientation;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIScrollView+SLCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIScrollView+SLCommon.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UIScrollView (SLCommon)
14 |
15 | /// Y轴方向的最大的偏移量
16 | - (CGFloat)sl_maxContentOffsetY;
17 | /// 在底部
18 | - (BOOL)sl_isBottom;
19 | /// 在顶部
20 | - (BOOL)sl_isTop;
21 | /// 滚动到顶部
22 | - (void)sl_scrollToTopWithAnimated:(BOOL)animated;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIScrollView+SLCommon.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIScrollView+SLCommon.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "UIScrollView+SLCommon.h"
10 |
11 | @implementation UIScrollView (SLCommon)
12 |
13 | - (CGFloat)sl_maxContentOffsetY {
14 | return MAX(0, self.contentSize.height - self.frame.size.height);
15 | }
16 | - (BOOL)sl_isBottom {
17 | return self.contentOffset.y + 0.5 >= [self sl_maxContentOffsetY] ||
18 | fabs(self.contentOffset.y - [self sl_maxContentOffsetY]) < FLT_EPSILON;
19 | }
20 | - (BOOL)sl_isTop {
21 | return self.contentOffset.y <= 0;
22 | }
23 | - (void)sl_scrollToTopWithAnimated:(BOOL)animated {
24 | [self setContentOffset:CGPointZero animated:animated];
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIView+SLFrame.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SLFrame.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/18.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UIView (SLFrame)
14 | @property (nonatomic, assign ) CGFloat sl_x;
15 | @property (nonatomic, assign ) CGFloat sl_y;
16 | @property (nonatomic, assign ) CGFloat sl_width;
17 | @property (nonatomic, assign ) CGFloat sl_height;
18 | @property (nonatomic, assign ) CGFloat sl_centerX;
19 | @property (nonatomic, assign ) CGFloat sl_centerY;
20 |
21 | @property (nonatomic, assign ) CGSize sl_size;
22 | @property (nonatomic, assign ) CGPoint sl_origin;
23 |
24 | @property (nonatomic, assign) CGFloat sl_left;
25 | @property (nonatomic, assign) CGFloat sl_right;
26 | @property (nonatomic, assign) CGFloat sl_top;
27 | @property (nonatomic, assign) CGFloat sl_bottom;
28 |
29 | @end
30 |
31 | NS_ASSUME_NONNULL_END
32 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/UIView+SLImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SLImage.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/10/17.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 视图转换为Image
14 | @interface UIView (SLImage)
15 | /// 截取视图转Image
16 | /// @param range 截图区域
17 | - (UIImage *)sl_imageByViewInRect:(CGRect)range;
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SLCategory/WKWebView+SLExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // WKWebView+SLExtension.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/30.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///设置UserAgent的方式
14 | typedef NS_ENUM (NSInteger, SLSetUAType){
15 | ///替换默认UA
16 | SLSetUATypeReplace,
17 | ///拼接默认UA
18 | SLSetUATypeAppend,
19 | };
20 |
21 | @interface WKWebView (SLExtension)
22 |
23 | ///注册http/https 以支持NSURLProtocol拦截WKWebView的网络请求
24 | + (void)sl_registerSchemeForSupportHttpProtocol;
25 | ///取消注册http/https
26 | + (void)sl_unregisterSchemeForSupportHttpProtocol;
27 |
28 | /// 获取UA
29 | + (NSString *)sl_getUserAgent;
30 | /// 设置UA 在WKWebView初始化之前设置,才能实时生效
31 | + (void)sl_setCustomUserAgentWithType:(SLSetUAType)type UAString:(NSString *)customUserAgent;
32 |
33 | ///设置自定义Cookie
34 | + (void)sl_setCustomCookieWithName:(NSString *)name
35 | value:(NSString *)value
36 | domain:(NSString *)domain
37 | path:(NSString *)path
38 | expiresDate:(NSDate *)expiresDate;
39 | ///查询获取所有Cookies
40 | + (void)sl_getAllCookies;
41 |
42 | @end
43 |
44 | NS_ASSUME_NONNULL_END
45 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/SceneDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/16.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SceneDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow * window;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ThirdLibary/BSBacktraceLogger/BSBacktraceLogger.h:
--------------------------------------------------------------------------------
1 | //
2 | // BSBacktraceLogger.h
3 | // BSBacktraceLogger
4 | //
5 | // Created by 张星宇 on 16/8/27.
6 | // Copyright © 2016年 bestswifter. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define BSLOG NSLog(@"%@",[BSBacktraceLogger bs_backtraceOfCurrentThread]);
12 | #define BSLOG_MAIN NSLog(@"%@",[BSBacktraceLogger bs_backtraceOfMainThread]);
13 | #define BSLOG_ALL NSLog(@"%@",[BSBacktraceLogger bs_backtraceOfAllThread]);
14 |
15 | ///记录线程的函数调用栈 https://toutiao.io/posts/aveig6/preview
16 | @interface BSBacktraceLogger : NSObject
17 |
18 | ///返回调用栈字符串 上传或其他处理
19 | + (NSString *)bs_backtraceOfAllThread;
20 | + (NSString *)bs_backtraceOfCurrentThread;
21 | + (NSString *)bs_backtraceOfMainThread;
22 | + (NSString *)bs_backtraceOfNSThread:(NSThread *)thread;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ThirdLibary/OpenGLUtils/GLESMath.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/ThirdLibary/OpenGLUtils/GLESMath.c
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ThirdLibary/OpenGLUtils/GLESUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // GLESUtils.h
3 | //
4 | // Created by kesalin@gmail.com on 12-11-25.
5 | // Copyright (c) 2012 年 http://blog.csdn.net/kesalin/. All rights reserved.
6 | //
7 |
8 | #import
9 | #include
10 |
11 | @interface GLESUtils : NSObject
12 |
13 | // Create a shader object, load the shader source string, and compile the shader.
14 | //
15 | +(GLuint)loadShader:(GLenum)type withString:(NSString *)shaderString;
16 |
17 | +(GLuint)loadShader:(GLenum)type withFilepath:(NSString *)shaderFilepath;
18 |
19 | //
20 | ///
21 | /// Load a vertex and fragment shader, create a program object, link program.
22 | /// Errors output to log.
23 | /// vertexShaderFilepath Vertex shader source file path.
24 | /// fragmentShaderFilepath Fragment shader source file path
25 | /// return A new program object linked with the vertex/fragment shader pair, 0 on failure
26 | //
27 | +(GLuint)loadProgram:(NSString *)vertexShaderFilepath withFragmentShaderFilepath:(NSString *)fragmentShaderFilepath;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2016 Apple Inc. All Rights Reserved.
3 | See LICENSE.txt for this sample’s licensing information
4 |
5 | Abstract:
6 | Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
7 | */
8 |
9 | #import
10 | #import
11 | #import
12 |
13 |
14 | typedef enum : NSInteger {
15 | NotReachable = 0,
16 | ReachableViaWiFi,
17 | ReachableViaWWAN
18 | } NetworkStatus;
19 |
20 | #pragma mark IPv6 Support
21 | //Reachability fully support IPv6. For full details, see ReadMe.md.
22 |
23 |
24 | extern NSString *kReachabilityChangedNotification;
25 |
26 |
27 | @interface Reachability : NSObject
28 |
29 | /*!
30 | * Use to check the reachability of a given host name.
31 | */
32 | + (instancetype)reachabilityWithHostName:(NSString *)hostName;
33 |
34 | /*!
35 | * Use to check the reachability of a given IP address.
36 | */
37 | + (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress;
38 |
39 | /*!
40 | * Checks whether the default route is available. Should be used by applications that do not connect to a particular host.
41 | */
42 | + (instancetype)reachabilityForInternetConnection;
43 |
44 |
45 | #pragma mark reachabilityForLocalWiFi
46 | //reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
47 | //+ (instancetype)reachabilityForLocalWiFi;
48 |
49 | /*!
50 | * Start listening for reachability notifications on the current run loop.
51 | */
52 | - (BOOL)startNotifier;
53 | - (void)stopNotifier;
54 |
55 | - (NetworkStatus)currentReachabilityStatus;
56 |
57 | /*!
58 | * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand.
59 | */
60 | - (BOOL)connectionRequired;
61 |
62 | @end
63 |
64 |
65 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYAnimatedImageView+iOS14.h
3 | // DarkMode
4 | //
5 | // Created by 王先生 on 2020/12/5.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "YYAnimatedImageView.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///主要解决 ios14YYAnimatedImageView图片显示问题 #573 https://github.com/ibireme/YYKit/issues/573
14 | @interface YYAnimatedImageView (iOS14)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYAnimatedImageView+iOS14.m
3 | // DarkMode
4 | //
5 | // Created by 王先生 on 2020/12/5.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "YYAnimatedImageView+iOS14.h"
10 | #import
11 |
12 | @implementation YYAnimatedImageView (iOS14)
13 | +(void)load {
14 | // 获取系统的方法
15 | Method displayLayerMethod = class_getInstanceMethod(self, @selector(displayLayer:));
16 | // 获取更新的方法
17 | Method displayLayerNewMethod = class_getInstanceMethod(self, @selector(displayLayerNew:));
18 | // 方法交换
19 | method_exchangeImplementations(displayLayerMethod, displayLayerNewMethod);
20 | }
21 | -(void)displayLayerNew:(CALayer *)layer {
22 | Ivar imageIvar = class_getInstanceVariable([self class], "_curFrame");
23 | UIImage *image = object_getIvar(self, imageIvar);
24 | if (image) {
25 | layer.contents = (__bridge id)image.CGImage;
26 | }
27 | else {
28 | if (@available(iOS 14.0, *)) {
29 | [super displayLayer:layer];
30 | }
31 | }
32 | }
33 | @end
34 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/16.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 | @property (weak, nonatomic) IBOutlet UITableView *tableView;
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/SLTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLTableViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/9.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///UITableView原理, 用UIScrollView实现 类似UITableView的复用功能
14 | @interface SLTableViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/SLUrlProtocolAddCookie.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLUrlProtocolAddCookie.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/5.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///解决WKWebView上请求不会自动携带Cookie的问题:通过NSURLProtocol,拦截request,然后在请求头里添加Cookie的方式
14 | @interface SLUrlProtocolAddCookie : NSURLProtocol
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/SLWebViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/21.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///关于WKWebView的那些坑: https://mp.weixin.qq.com/s/rhYKLIbXOsUJC_n6dt9UfA?
14 | /// https://github.com/ChenYilong/ParseSourceCodeStudy/blob/master/02_Parse%E7%9A%84%E7%BD%91%E7%BB%9C%E7%BC%93%E5%AD%98%E4%B8%8E%E7%A6%BB%E7%BA%BF%E5%AD%98%E5%82%A8/iOS%E7%BD%91%E7%BB%9C%E7%BC%93%E5%AD%98%E6%89%AB%E7%9B%B2%E7%AF%87.md
15 | /// https://dequan1331.github.io/index.html
16 | ///关于WKWebView的使用可以看我之前的总结: https://github.com/wsl2ls/WKWebView
17 | @interface SLWebViewController : SLViewController
18 |
19 | ///打开的web地址 默认:https://www.jianshu.com/p/5cf0d241ae12
20 | @property (nonatomic, strong) NSString *urlString;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/SLWebViewListController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebViewListController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/27.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 关于WKWebView的知识点列表
14 | @interface SLWebViewListController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebCache/SLUrlCache.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLUrlCache.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/1.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///缓存方案2: NSURLCache
14 | @interface SLUrlCache : NSURLCache
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebCache/SLUrlCache.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLUrlCache.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/1.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLUrlCache.h"
10 | #import "SLWebCacheManager.h"
11 |
12 | @interface SLUrlCache ()
13 |
14 | @end
15 |
16 | @implementation SLUrlCache
17 |
18 | #pragma mark - Override
19 | ///开始缓存
20 | - (NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request {
21 | if (![[SLWebCacheManager shareInstance] canCacheRequest:request]) {
22 | return nil;
23 | }
24 | ///本地缓存的数据
25 | NSCachedURLResponse *cachedResponse = [[SLWebCacheManager shareInstance] loadCachedResponeWithRequest:request];
26 | if(!cachedResponse) {
27 | //没有缓存,请求网络数据
28 | cachedResponse = [[SLWebCacheManager shareInstance] requestNetworkData:request];
29 | }
30 | //调用系统的缓存方法,当然这里也可以不用调
31 | [self storeCachedResponse:cachedResponse forRequest:request];
32 | return cachedResponse;;
33 | }
34 | ///移除缓存
35 | - (void)removeCachedResponseForRequest:(NSURLRequest *)request {
36 | [super removeCachedResponseForRequest:request];
37 | [[SLWebCacheManager shareInstance] removeCacheFileWithRequest:request];
38 | }
39 | ///移除所有缓存
40 | - (void)removeAllCachedResponses {
41 | [super removeAllCachedResponses];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebCache/SLUrlProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLUrlProtocol.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/30.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 | /*
13 | NSURLProtocol的简介:https://www.jianshu.com/p/ae5e8f9988d8
14 | */
15 |
16 | ///缓存方案1: NSURLProtocol 拦截HTTP/https请求 实现缓存
17 | @interface SLUrlProtocol : NSURLProtocol
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebCacheViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// WKWebView 缓存实现
14 | @interface SLWebCacheViewController : SLViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLPictureBrowseController.h
3 | // TELiveClass
4 | //
5 | // Created by wsl on 2020/2/28.
6 | // Copyright © 2020 offcn_c. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @protocol SLPictureAnimationViewDelegate
14 | //用于转场的动画视图
15 | - (UIView *)animationViewOfPictureTransition:(NSIndexPath *)indexPath;
16 | @end
17 |
18 | /// 图集浏览控制器
19 | @interface SLPictureBrowseController : UIViewController
20 | @property (nonatomic, strong) NSMutableArray *imagesArray;
21 | @property (nonatomic, strong) NSIndexPath *indexPath; //数据来源索引
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLPictureTransitionAnimation.h
3 | // TELiveClass
4 | //
5 | // Created by wsl on 2020/2/28.
6 | // Copyright © 2020 offcn_c. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | //定义枚举 转场类型
14 | typedef enum : NSUInteger {
15 | SLTransitionTypePush,
16 | SLTransitionTypePop,
17 | SLTransitionTypePresent,
18 | SLTransitionTypeDissmiss
19 | } SLTransitionType;
20 |
21 | /// 图片浏览转场动画
22 | @interface SLPictureTransitionAnimation : NSObject
23 | @property (nonatomic, assign) SLTransitionType transitionType;
24 | @property (nonatomic, strong) UIView *toAnimatonView; //动画前的视图
25 | @property (nonatomic, strong) UIView *fromAnimatonView; //动画后的视图
26 | //@property (nonatomic, assign) CGRect animatonRect;
27 | //@property (nonatomic, strong) UIView *animatonView;
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLReusableManager.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/14.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLReusableCell : UIView
14 | @end
15 |
16 | @class SLReusableManager;
17 | @protocol SLReusableDataSource
18 | @required
19 | ///行数
20 | - (NSInteger)numberOfRowsInReusableManager:(SLReusableManager *)reusableManager;
21 | ///行位置
22 | - (CGRect)reusableManager:(SLReusableManager *)reusableManager frameForRowAtIndex:(NSInteger)index;
23 | ///行内容
24 | - (SLReusableCell *)reusableManager:(SLReusableManager *)reusableManager cellForRowAtIndex:(NSInteger)index;
25 | @end
26 | @protocol SLReusableDelegate
27 | ///选中行
28 | - (void)reusableManager:(SLReusableManager *)reusableManager didSelectRowAtIndex:(NSInteger)index;
29 | @end
30 |
31 | @interface SLReusableManager : NSObject
32 | ///事件代理
33 | @property (nonatomic, weak) iddelegate;
34 | ///数据源代理
35 | @property (nonatomic, weak) iddataSource;
36 | /// 父视图
37 | @property (nonatomic, weak) UIScrollView *scrollView;
38 |
39 | ///刷新数据
40 | - (void)reloadData;
41 | ///注册样式
42 | - (void)registerClass:(Class)class forCellReuseIdentifier:(NSString *)cellID;
43 | ///根据cellID从复用池reusablePool取可重用的view,如果没有,重新创建一个新对象返回
44 | - (SLReusableCell *)dequeueReusableCellWithIdentifier:(nonnull NSString *)cellID index:(NSInteger)index;
45 | ///获取索引为index的cell,如果第index的cell不在可见范围内,返回nil
46 | - (SLReusableCell *)cellForRowAtIndex:(NSInteger)index;
47 |
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebNativeViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// WKWebView渲染的部分HTML元素替换为用原生组件显示
14 | @interface SLWebNativeViewController : SLViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLDynamicItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLDynamicItem.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///动力元素 力的作用对象
14 | @interface SLDynamicItem : NSObject
15 | @property (nonatomic, readwrite) CGPoint center;
16 | @property (nonatomic, readonly) CGRect bounds;
17 | @property (nonatomic, readwrite) CGAffineTransform transform;
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLDynamicItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLDynamicItem.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLDynamicItem.h"
10 |
11 | @implementation SLDynamicItem
12 | - (instancetype)init {
13 | self = [super init];
14 | if (self) {
15 | _bounds = CGRectMake(0, 0, 1, 1);
16 | }
17 | return self;
18 | }
19 | @end
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLScrollViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLScrollViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/29.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///继承于UIView,自定义实现UIScrollView的效果
14 | @interface SLScrollViewController : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebTableViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/22.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*
14 | WKWebView + UITableView
15 | 方案1:WebView作为TableView的Header, 撑开webView,显示渲染全部内容,当内容过多时,比如大量图片时,容易造成内存暴涨(不建议使用)
16 | 参考: https://www.jianshu.com/p/42858f95ab43、https://dequan1331.github.io/hybrid-page-kit.html、https://www.jianshu.com/p/3721d736cf68
17 | */
18 | @interface SLWebTableViewController : SLViewController
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebTableViewController2.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/25.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SLDynamicItem.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /*
15 | WKWebView + UITableView
16 | 方案2:将tableView加到WKWebView.scrollView上, WKWebView加载的HTML最后留一个空白占位div,用于确定tableView的位置,在监听到webView.scrollView.contentSize变化后,不断调整tableView的位置,同时将该div的尺寸设置为tableView的尺寸。禁用tableView和webView.scrollVie的scrollEnabled = NO,通过添加pan手势,手动调整contentOffset。tableView的最大高度为屏幕高度,当内容不足一屏时,高度为内容高度。
17 | 参考: https://www.jianshu.com/p/42858f95ab43、https://dequan1331.github.io/hybrid-page-kit.html、https://www.jianshu.com/p/3721d736cf68
18 | */
19 | @interface SLWebTableViewController2 : SLViewController
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebTableViewController3.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/27.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*
14 | WKWebView + UITableView
15 | 方案3:(推荐) WKWebView作为TableView的Header, 但不撑开webView。禁用tableView和webView.scrollVie的scrollEnabled = NO,通过添加pan手势,手动调整contentOffset。WebView的最大高度为屏幕高度,当内容不足一屏时,高度为内容高度。和方案2类似,但是不需要插入占位Div。
16 | */
17 | @interface SLWebTableViewController3 : SLViewController
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWebTableViewController4.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/5/28.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /*
14 | WKWebView + UITableView
15 | 方案4:(推荐)[UIScrollView addSubView: WKWebView & UITableView]; UIScrollView.contenSize = WKWebView.contenSize + UITableView.contenSize; WKWebView和UITableView的最大高度为一屏高,并禁用scrollEnabled=NO,然后根据UIScrollView的滑动偏移量调整WKWebView和UITableView的展示区域contenOffset
16 | */
17 | @interface SLWebTableViewController4 : SLViewController
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WKWebView/wsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/WKWebView/wsl.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.h:
--------------------------------------------------------------------------------
1 | //
2 | // QiCallTraceCore.h
3 | // Qi_ObjcMsgHook
4 | //
5 | // Created by liusiqi on 2019/11/20.
6 | // Copyright © 2019 QiShare. All rights reserved.
7 | //
8 |
9 | #ifndef QiCallTraceCore_h
10 | #define QiCallTraceCore_h
11 |
12 | #include
13 | #include
14 |
15 |
16 | /*
17 | 函数调用耗时监测 来源:https://www.jianshu.com/p/bc1c000afdba
18 | */
19 |
20 | typedef struct {
21 | __unsafe_unretained Class cls;
22 | SEL sel;
23 | uint64_t time; // us (1/1000 ms)
24 | int depth;
25 | } qiCallRecord;
26 |
27 | extern void qiCallTraceStart(void);
28 | extern void qiCallTraceStop(void);
29 |
30 | extern void qiCallConfigMinTime(uint64_t us); //default 1000
31 | extern void qiCallConfigMaxDepth(int depth); //default 3
32 |
33 | extern qiCallRecord *qiGetCallRecords(int *num);
34 | extern void qiClearCallRecords(void);
35 |
36 | #endif /* QiCallTraceCore_h */
37 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMCpu.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/13.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///CPU占有率监听
14 | @interface SLAPMCpu : NSObject
15 | ///返回GPU使用情况 占有率
16 | + (double)getCpuUsage;
17 | /// 返回CPU使用情况 占有率
18 | /// @param max 设定CPU使用率最大边界值
19 | /// @param callback 超出边界后的回调方法 返回此时的堆栈信息
20 | + (double)getCpuUsageWithMax:(float)max outOfBoundsCallback:(void(^)(NSString *string))callback;
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMFluency.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/14.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 | @class SLAPMFluency;
13 | @protocol SLAPMFluencyDelegate
14 | ///卡顿监控回调 当callStack不为nil时,表示发生卡顿并捕捉到卡顿时的调用栈;type == SLAPMFluencyTypeRunloop时,fps为0
15 | - (void)APMFluency:(SLAPMFluency *)fluency didChangedFps:(float)fps callStackOfStuck:(nullable NSString *)callStack;
16 | @end
17 |
18 | /// 卡顿监测策略/类型
19 | typedef NS_ENUM(NSInteger, SLAPMFluencyType) {
20 | /* 建议 Runloop,不消耗额外的CPU资源,可以获取卡顿时的调用堆栈 */
21 | SLAPMFluencyTypeRunloop = 0,
22 | /*FPS 无法获取卡顿时的调用堆栈,消耗CPU资源,不利于CPU使用率的监控,但可以作为衡量卡顿程度的指数*/
23 | SLAPMFluencyTypeFps = 1,
24 | /*所有策略*/
25 | SLAPMFluencyTypeAll = 2
26 | };
27 |
28 | ///流畅度监听 是否卡顿
29 | @interface SLAPMFluency : NSObject
30 |
31 | @property (nonatomic, weak) id delegate;
32 | ///卡顿监测策略/类型 默认建议 SLAPMFluencyTypeRunloop
33 | @property (nonatomic, assign) SLAPMFluencyType type;
34 |
35 | + (instancetype)sharedInstance;
36 | ///开始监听
37 | - (void)startMonitorFluency;
38 | ///结束监听
39 | - (void)stopMonitorFluency;
40 |
41 | @end
42 |
43 | NS_ASSUME_NONNULL_END
44 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMLoadTime.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/4.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | ///监测+load方法耗时 引自: https://www.jianshu.com/p/c14987eee107、https://www.cnblogs.com/feng9exe/p/12487662.html
12 | @interface SLAPMLoadTime : NSObject
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMManager.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/13.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// app性能监控策略/类型
14 | typedef NS_ENUM(NSInteger, SLAPMType) {
15 | /*无*/
16 | SLAPMTypeNone = 0,
17 | /*CPU占用率*/
18 | SLAPMTypeCpu = 1 << 0,
19 | /*内存使用情况*/
20 | SLAPMTypeMemory = 1 << 1,
21 | /*流畅度、卡顿*/
22 | SLAPMTypeFluency = 1 << 2,
23 | /*iOS Crash防护模块*/
24 | SLAPMTypeCrash = 1 << 3,
25 | /*线程数量监控,防止线程爆炸*/
26 | SLAPMTypeThreadCount = 1 << 4,
27 | /*网络监控*/
28 | SLAPMTypeNetwork = 1 << 5,
29 | /*VC启动耗时监测*/
30 | SLAPMTypeVCTime = 1 << 6,
31 | /*所有策略*/
32 | SLAPMTypeAll = 1 << 7
33 | };
34 |
35 |
36 | /// APM 管理者
37 | @interface SLAPMManager : NSObject
38 |
39 | ///是否正在监控
40 | @property (nonatomic, assign) BOOL isMonitoring;
41 | ///app性能监控策略/类型 默认SLAPMTypeAll
42 | @property (nonatomic, assign) SLAPMType type;
43 |
44 | + (instancetype)manager;
45 |
46 | ///开始监控
47 | - (void)startMonitoring;
48 | ///结束监控
49 | - (void)stopMonitoring;
50 |
51 | @end
52 |
53 | NS_ASSUME_NONNULL_END
54 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMMemoryDisk.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/18.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// 内存磁盘容量监控
14 | @interface SLAPMMemoryDisk : NSObject
15 |
16 | ///当前应用的内存占用情况,和Xcode数值相近 单位MB
17 | + (double)getAppUsageMemory;
18 | ///剩余空闲内存 单位MB
19 | + (double)getFreeMemory;
20 | /// 总共的内存大小 单位MB
21 | + (double)getTotalMemory;
22 |
23 | ///filePath目录下的文件 占用的磁盘大小 单位MB 默认沙盒Caches目录 此句代码不要频繁定时执行,比较耗内存
24 | + (double)getFileUsageDisk:(NSString *)filePath;
25 | ///剩余空闲的磁盘容量 单位G
26 | + (double)getFreeDisk;
27 | ///总磁盘容量 单位G
28 | + (double)getTotalDisk;
29 |
30 | @end
31 |
32 | NS_ASSUME_NONNULL_END
33 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMThreadCount.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/23.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///监控线程数量 来源:https://juejin.im/post/5e92a113e51d4547134bdadb
14 | @interface SLAPMThreadCount : NSObject
15 |
16 | ///开始监听
17 | + (void)startMonitorThreadCount;
18 | ///结束监听
19 | + (void)stopMonitorThreadCount;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMURLProtocol.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/3.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///网络监控 TCP 建立连接时间 、DNS 时间、 SSL时间、首包时间、响应时间 、流量
14 | @interface SLAPMURLProtocol : NSURLProtocol
15 |
16 | ///开始监听网络
17 | + (void)startMonitorNetwork;
18 | ///结束监听网络
19 | + (void)stopMonitorNetwork;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+SLAPMVCTime.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/4.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///ViewController启动耗时监测 -loadView --> -viewDidAppear
14 | @interface UIViewController (SLAPMVCTime)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLAPMViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/13.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///iOS APM应用性能监控管理
14 | @interface SLAPMViewController : SLViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/SLWorkIssuesViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLWorkIssuesViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/6/11.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///工作中遇到过的问题,踩过的坑
14 | @interface SLWorkIssuesViewController : UITableViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLMenuView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLMenuView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/3.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @class SLMenuView;
14 | @protocol SLMenuViewDelegate
15 | - (void)menuView:(SLMenuView *)menuView didSelectItemAtIndex:(NSInteger)index;
16 | @end
17 |
18 | @interface SLMenuView : UIView
19 | @property (nonatomic, weak) iddelegate;
20 | @property (nonatomic, strong) NSArray *titles;
21 | @property (nonatomic, assign) NSInteger currentPage;
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLPanTableView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLPanTableView.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///此类主要用于TableView的滑动手势向下层传递
14 | @interface SLPanTableView : UITableView
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLPanTableView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLPanTableView.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLPanTableView.h"
10 |
11 | @implementation SLPanTableView
12 | //是否允许多个手势识别器共同识别,一个控件的手势识别后是否阻断手势识别继续向下传播,默认返回NO,上层对象识别后则不再继续传播;如果为YES,响应者链上层对象触发手势识别后,如果下层对象也添加了手势并成功识别也会继续执行。
13 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
14 | return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
15 | }
16 | @end
17 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLScrollViewJianShu.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLScrollViewJianShu.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/15.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLScrollViewJianShu : UIViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLScrollViewJuejin.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLScrollViewJuejin.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///掘金APP个人中心页的ScrollView嵌套样式
14 | @interface SLScrollViewJuejin : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLScrollViewWeibo.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLScrollViewWeibo.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/8.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///微博发现页ScrollView嵌套样式
14 | @interface SLScrollViewWeibo : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/ScrollView嵌套/SLScrollviewNesteVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLScrollviewNesteVC.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/9/2.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///多个ScrollView/TableView/CollectionView嵌套
14 | @interface SLScrollviewNesteVC : UITableViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/UIMenuController/SLMenuViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLMenuViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/3/9.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLMenuViewController : UIViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/二进制重排/Order File.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/WorkIssues/二进制重排/Order File.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/二进制重排/Other c Flags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/WorkIssues/二进制重排/Other c Flags.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/二进制重排/SLBinaryResetViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLBinaryResetViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/7/6.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | //参考:https://juejin.cn/post/6844904130406793224
14 | // https://github.com/rhythmkay/PGOAnalyzer
15 | ///二进制重排优化启动时间
16 | @interface SLBinaryResetViewController : SLViewController
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/二进制重排/Write Link Map File.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/WorkIssues/二进制重排/Write Link Map File.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/查找项目无用资源/SLResourceInfo.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLResourceInfo.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/21.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SLResourceInfo : NSObject
14 |
15 | ///文件路径
16 | @property (nonatomic, copy) NSString *fileName;
17 | ///文件路径
18 | @property (nonatomic, copy) NSString *filePath;
19 | ///文件大小
20 | @property (nonatomic, assign) CGFloat fileSize;
21 | /// 是否为文件夹
22 | @property (nonatomic, assign) BOOL isFolder;
23 | /// 文件类型
24 | @property (nonatomic, copy) NSString *fileType;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/查找项目无用资源/SLResourceInfo.m:
--------------------------------------------------------------------------------
1 | //
2 | // SLResourceInfo.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/21.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import "SLResourceInfo.h"
10 |
11 | @implementation SLResourceInfo
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/查找项目无用资源/SLUnusedResourceViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SLUnusedResourceViewController.h
3 | // DarkMode
4 | //
5 | // Created by wsl on 2020/8/20.
6 | // Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | ///扫描项目无用的图片、类等文件资源, 此示例主要针对于此项目中的图片资源,其他类型资源实现原理相同
14 | @interface SLUnusedResourceViewController : UITableViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/WorkIssues/查找项目无用资源/unused.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/iOS_Tips/DarkMode/WorkIssues/查找项目无用资源/unused.png
--------------------------------------------------------------------------------
/iOS_Tips/DarkMode/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DarkMode
4 | //
5 | // Created by wsl on 2019/9/16.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | NSString * appDelegateClassName;
14 | @autoreleasepool {
15 | // Setup code that might create autoreleased objects goes here.
16 | appDelegateClassName = NSStringFromClass([AppDelegate class]);
17 | }
18 | return UIApplicationMain(argc, argv, nil, appDelegateClassName);
19 | }
20 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkModeTests/DarkModeTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DarkModeTests.m
3 | // DarkModeTests
4 | //
5 | // Created by wsl on 2019/9/16.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DarkModeTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DarkModeTests
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 measureWithMetrics:@[[[XCTCPUMetric alloc] init]] block:^{
33 | // Put the code whose CPU performance you want to measure here.
34 | }];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkModeTests/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkModeUITests/DarkModeUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DarkModeUITests.m
3 | // DarkModeUITests
4 | //
5 | // Created by wsl on 2019/9/16.
6 | // Copyright © 2019 wsl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DarkModeUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DarkModeUITests
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 | // In UI tests it is usually best to stop immediately when a failure occurs.
21 | self.continueAfterFailure = NO;
22 |
23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
24 | }
25 |
26 | - (void)tearDown {
27 | // Put teardown code here. This method is called after the invocation of each test method in the class.
28 | }
29 |
30 | - (void)testExample {
31 | // UI tests must launch the application that they test.
32 | XCUIApplication *app = [[XCUIApplication alloc] init];
33 | [app launch];
34 |
35 | // Use recording to get started writing UI tests.
36 | // Use XCTAssert and related functions to verify your tests produce the correct results.
37 | }
38 |
39 | - (void)testLaunchPerformance {
40 | // This measures how long it takes to launch your application from the home screen.
41 | [self measureWithMetrics:@[XCTOSSignpostMetric.applicationLaunchMetric] block:^{
42 | [[[XCUIApplication alloc] init] launch];
43 | }];
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/iOS_Tips/DarkModeUITests/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS_Tips/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://github.com/CocoaPods/Specs.git'
2 | #source 'https://gitee.com/mirrors/CocoaPods-Specs.git'
3 | platform :ios,’10.0’
4 | target "DarkMode" do
5 |
6 | pod 'GPUImage'
7 | #pod 'MLeaksFinder'
8 | pod 'MBProgressHUD'
9 | pod 'Masonry'
10 | pod 'YYImage'
11 | pod 'YYWebImage'
12 | pod 'YYModel'
13 | pod 'YYModel'
14 | pod 'MJRefresh'
15 | end
16 |
--------------------------------------------------------------------------------
/微信公众号.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wsl2ls/iOS_Tips/fdbee7cf5e18a4a49a42002ab16a0ba108f02b9d/微信公众号.png
--------------------------------------------------------------------------------