├── .gitignore ├── Dynamic-Linking.md ├── EventHandle.md ├── LICENSE ├── README.md └── macOS-dev ├── .DS_Store ├── Day10- NSApplication └── NSApplicationDemo │ ├── NSApplicationDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSApplicationDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day11- NSDocment └── NSDocumentDemo │ ├── NSDocumentDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSDocumentDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Document.swift │ ├── Info.plist │ └── ViewController.swift ├── Day12- NSTextField └── NSTextFieldDemo │ ├── .DS_Store │ ├── NSTextFieldDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSTextFieldDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day13- NSTextView ├── .DS_Store ├── NSTextViewDemo │ ├── .DS_Store │ ├── NSTextViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── NSTextViewDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift └── note.md ├── Day14- NSAlert └── NSAlertDemo │ ├── NSAlertDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSAlertDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── alert.imageset │ │ ├── Contents.json │ │ └── alert.png │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day15- NSPopOver └── NSPopoverDemo │ ├── NSPopoverDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSPopoverDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day16- NSMenu ├── NSMenu.md └── NSMenuDemo │ ├── NSMenuDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSMenuDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day17- NSContainerView ├── NSContainerView.md └── NSContainerViewDemo │ ├── NSContainerViewDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSContainerViewDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day18- NSSlider ├── NSSlierDemo │ ├── NSSlierDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── NSSlierDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── indator.imageset │ │ │ ├── Contents.json │ │ │ └── indator.png │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MYSliderCell.swift │ │ └── ViewController.swift └── Slider.md ├── Day19- NSOpenPanel ├── NSOpenPanel.md └── NSOpenPanelDemo │ ├── NSOpenPanelDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSOpenPanelDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day2 - Storyboard └── StoryboadDemo │ ├── StoryboadDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── StoryboadDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── Main.storyboard │ ├── One.storyboard │ ├── One~.storyboard │ ├── Third.storyboard │ └── Third~.storyboard │ ├── Info.plist │ ├── NewStoryboard.storyboard │ ├── Two.storyboard │ └── ViewController.swift ├── Day20- Cocoapod ├── CocoapodDemo │ ├── CocoapodDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── CocoapodDemo.xcworkspace │ │ └── contents.xcworkspacedata │ ├── CocoapodDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift │ ├── Podfile │ ├── Podfile.lock │ └── Pods │ │ ├── Manifest.lock │ │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ │ ├── SnapKit │ │ ├── LICENSE │ │ ├── README.md │ │ └── Source │ │ │ ├── Constraint.swift │ │ │ ├── ConstraintAttributes.swift │ │ │ ├── ConstraintConfig.swift │ │ │ ├── ConstraintConstantTarget.swift │ │ │ ├── ConstraintDSL.swift │ │ │ ├── ConstraintDescription.swift │ │ │ ├── ConstraintInsetTarget.swift │ │ │ ├── ConstraintInsets.swift │ │ │ ├── ConstraintItem.swift │ │ │ ├── ConstraintLayoutGuide+Extensions.swift │ │ │ ├── ConstraintLayoutGuide.swift │ │ │ ├── ConstraintLayoutGuideDSL.swift │ │ │ ├── ConstraintLayoutSupport.swift │ │ │ ├── ConstraintLayoutSupportDSL.swift │ │ │ ├── ConstraintMaker.swift │ │ │ ├── ConstraintMakerEditable.swift │ │ │ ├── ConstraintMakerExtendable.swift │ │ │ ├── ConstraintMakerFinalizable.swift │ │ │ ├── ConstraintMakerPriortizable.swift │ │ │ ├── ConstraintMakerRelatable.swift │ │ │ ├── ConstraintMultiplierTarget.swift │ │ │ ├── ConstraintOffsetTarget.swift │ │ │ ├── ConstraintPriority.swift │ │ │ ├── ConstraintPriorityTarget.swift │ │ │ ├── ConstraintRelatableTarget.swift │ │ │ ├── ConstraintRelation.swift │ │ │ ├── ConstraintView+Extensions.swift │ │ │ ├── ConstraintView.swift │ │ │ ├── ConstraintViewDSL.swift │ │ │ ├── Debugging.swift │ │ │ ├── LayoutConstraint.swift │ │ │ ├── LayoutConstraintItem.swift │ │ │ └── UILayoutSupport+Extensions.swift │ │ └── Target Support Files │ │ ├── Pods-CocoapodDemo │ │ ├── Info.plist │ │ ├── Pods-CocoapodDemo-acknowledgements.markdown │ │ ├── Pods-CocoapodDemo-acknowledgements.plist │ │ ├── Pods-CocoapodDemo-dummy.m │ │ ├── Pods-CocoapodDemo-frameworks.sh │ │ ├── Pods-CocoapodDemo-resources.sh │ │ ├── Pods-CocoapodDemo-umbrella.h │ │ ├── Pods-CocoapodDemo.debug.xcconfig │ │ ├── Pods-CocoapodDemo.modulemap │ │ └── Pods-CocoapodDemo.release.xcconfig │ │ └── SnapKit │ │ ├── Info.plist │ │ ├── SnapKit-dummy.m │ │ ├── SnapKit-prefix.pch │ │ ├── SnapKit-umbrella.h │ │ ├── SnapKit.modulemap │ │ └── SnapKit.xcconfig └── cocoapod安装.md ├── Day21 - NSStatusBar ├── NSStatusBar.md ├── NSStatusBarDemo │ ├── NSStatusBarDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── NSStatusBarDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── icon.imageset │ │ │ ├── Contents.json │ │ │ └── icon.png │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift └── icon.png ├── Day22- Custom View ├── .DS_Store ├── CustomView.md ├── CustomViewDemo │ ├── .DS_Store │ ├── CustomViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── CustomViewDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MYBackgroundView.swift │ │ ├── MYCircleView.swift │ │ ├── NSBezierPath-extension.swift │ │ └── ViewController.swift └── NSBezierPath-extension.swift ├── Day23- CocoaBind ├── Cocoa Bind.md └── CocoaBindingDemo │ ├── CocoaBindingDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── CocoaBindingDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day24- NSToolBar ├── NSTooBarDemo │ ├── NSTooBarDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── NSTooBarDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MYWindowController.swift │ │ └── ViewController.swift └── NSToolBar.md ├── Day25- NSViewController ├── .DS_Store ├── NSViewController - 视图控制器.md └── NSViewControllerDemo │ ├── .DS_Store │ ├── NSViewControllerDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── NSViewControllerDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── CustomAnimation.swift │ ├── Info.plist │ ├── MYFirstController.swift │ ├── MYFirstController.xib │ └── ViewController.swift ├── Day26-NSWindowController ├── .DS_Store ├── NSWindowController : 窗口控制器.md └── NSWindowControllerDemo │ ├── .DS_Store │ ├── NSWindowControllerDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSWindowControllerDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── MYContentController.swift │ ├── MYContentController.xib │ ├── MYWindowController.swift │ ├── NewWindowController.swift │ ├── NewWindowController.xib │ └── ViewController.swift ├── Day27- NSArrayController ├── NSArrayController.md └── NSArrayControllerDemo │ ├── NSArrayControllerDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSArrayControllerDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── Student.swift │ └── ViewController.swift ├── Day28- WebView ├── WebViewDemo │ ├── WebViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── WebViewDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift └── webView.md ├── Day29- EventHandling ├── .DS_Store ├── EventHandlingDemo │ ├── .DS_Store │ └── EventHandlingDemo │ │ └── ViewController.swift └── NSEventHandlingDemo │ ├── NSEventHandlingDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSEventHandlingDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── MYView.swift │ └── ViewController.swift ├── Day3- AutoLayout └── AutoresizingDemo │ ├── AutoresizingDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── AutoresizingDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Day30- AppIcon&SandBox ├── App Icon & SandBox.md ├── AppIconDemo │ ├── AppIconDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── AppIconDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift ├── SandBoxDemo │ ├── SandBoxDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── SandBoxDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── SandBoxDemo.entitlements │ │ └── ViewController.swift └── aboutFinished.md ├── Day31- NSTabViewController └── TabViewControllerDemo │ ├── TabViewControllerDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── TabViewControllerDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── OneViewController.swift │ ├── TabViewController.swift │ ├── TabViewControllerDemo.entitlements │ ├── TwoViewController.swift │ └── XCSegmentedControl.swift ├── Day32-VideoEidt └── VideoWatermarkDemo │ ├── VideoWatermarkDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── VideoWatermarkDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Group@2x.png │ ├── Group@3x.png │ ├── Info.plist │ ├── VideoWatermarkDemo.entitlements │ ├── ViewController.swift │ ├── XCVideoEditManager │ ├── XCVideoComposition.swift │ ├── XCVideoEditManager.swift │ ├── XCVideoExporter.swift │ └── XCVideoWatermark.swift │ └── video.mp4 ├── Day33- CaptureWindow ├── Day33- CaptureWindow.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Day33- CaptureWindow │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Day33__CaptureWindow.entitlements │ ├── Info.plist │ ├── MouseDrawView.swift │ ├── ViewController.swift │ └── XCWindowController.swift └── ScreenCap │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── ScreenCap.entitlements │ ├── ScreenCapture.framework │ ├── Resources │ ├── ScreenCapture │ └── Versions │ │ ├── A │ │ ├── Resources │ │ │ ├── Info.plist │ │ │ ├── YascaControlPanel.nib │ │ │ ├── YascaControlPanelBackGround.tiff │ │ │ ├── YascaControlPanelBackGround_Up.tiff │ │ │ ├── YascaControlPanelSplit.tiff │ │ │ ├── color_choose.tiff │ │ │ ├── mouse_resize_lbru.tiff │ │ │ ├── mouse_resize_lr.tiff │ │ │ ├── mouse_resize_lurb.tiff │ │ │ └── mouse_resize_ub.tiff │ │ ├── ScreenCapture │ │ └── _CodeSignature │ │ │ └── CodeResources │ │ └── Current │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── Day34-Gif └── GifDemo │ ├── GifDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── GifDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── GifDemo.entitlements │ ├── Info.plist │ └── ViewController.swift ├── Day35-CAAnimation └── CAAinamationDemo │ ├── CAAinamationDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── CAAinamationDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── CAAinamationDemo.entitlements │ ├── Info.plist │ ├── NSBezier+CGPath.swift │ └── ViewController.swift ├── Day36-DarkMode └── DarkModeAdapter │ ├── DarkModeAdapter.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── DarkModeAdapter │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Color.colorset │ │ └── Contents.json │ ├── Contents.json │ └── Star.imageset │ │ ├── Contents.json │ │ ├── big_star@2x.png │ │ ├── big_star@3x.png │ │ ├── big_star_click@2x.png │ │ └── big_star_click@3x.png │ ├── Base.lproj │ └── Main.storyboard │ ├── DarkModeAdapter.entitlements │ ├── Info.plist │ ├── ViewController.swift │ └── XCMyCustomView.swift ├── Day37-CustomCollectionViewLayout ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods │ ├── AFNetworking │ │ ├── AFNetworking │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFHTTPSessionManager.m │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworkReachabilityManager.m │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFSecurityPolicy.m │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLRequestSerialization.m │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLResponseSerialization.m │ │ │ ├── AFURLSessionManager.h │ │ │ └── AFURLSessionManager.m │ │ ├── LICENSE │ │ └── README.md │ ├── CocoaSecurity │ │ ├── CocoaSecurity │ │ │ ├── CocoaSecurity.h │ │ │ └── CocoaSecurity.m │ │ ├── LICENSE │ │ ├── README.md │ │ └── submodules │ │ │ └── Base64 │ │ │ └── Base64 │ │ │ ├── Base64.h │ │ │ └── Base64.m │ ├── Headers │ │ ├── Private │ │ │ ├── AFNetworking │ │ │ │ ├── AFHTTPSessionManager.h │ │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ │ ├── AFNetworking.h │ │ │ │ ├── AFSecurityPolicy.h │ │ │ │ ├── AFURLRequestSerialization.h │ │ │ │ ├── AFURLResponseSerialization.h │ │ │ │ └── AFURLSessionManager.h │ │ │ ├── CocoaSecurity │ │ │ │ ├── Base64.h │ │ │ │ └── CocoaSecurity.h │ │ │ ├── MJExtension │ │ │ │ ├── MJExtension.h │ │ │ │ ├── MJExtensionConst.h │ │ │ │ ├── MJFoundation.h │ │ │ │ ├── MJProperty.h │ │ │ │ ├── MJPropertyKey.h │ │ │ │ ├── MJPropertyType.h │ │ │ │ ├── NSObject+MJClass.h │ │ │ │ ├── NSObject+MJCoding.h │ │ │ │ ├── NSObject+MJKeyValue.h │ │ │ │ ├── NSObject+MJProperty.h │ │ │ │ └── NSString+MJExtension.h │ │ │ └── SDWebImage │ │ │ │ ├── NSData+ImageContentType.h │ │ │ │ ├── NSImage+WebCache.h │ │ │ │ ├── SDImageCache.h │ │ │ │ ├── SDImageCacheConfig.h │ │ │ │ ├── SDWebImageCompat.h │ │ │ │ ├── SDWebImageDecoder.h │ │ │ │ ├── SDWebImageDownloader.h │ │ │ │ ├── SDWebImageDownloaderOperation.h │ │ │ │ ├── SDWebImageManager.h │ │ │ │ ├── SDWebImageOperation.h │ │ │ │ ├── SDWebImagePrefetcher.h │ │ │ │ ├── UIButton+WebCache.h │ │ │ │ ├── UIImage+GIF.h │ │ │ │ ├── UIImage+MultiFormat.h │ │ │ │ ├── UIImageView+HighlightedWebCache.h │ │ │ │ ├── UIImageView+WebCache.h │ │ │ │ ├── UIView+WebCache.h │ │ │ │ └── UIView+WebCacheOperation.h │ │ └── Public │ │ │ ├── AFNetworking │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ └── AFURLSessionManager.h │ │ │ ├── CocoaSecurity │ │ │ ├── Base64.h │ │ │ └── CocoaSecurity.h │ │ │ ├── MJExtension │ │ │ ├── MJExtension.h │ │ │ ├── MJExtensionConst.h │ │ │ ├── MJFoundation.h │ │ │ ├── MJProperty.h │ │ │ ├── MJPropertyKey.h │ │ │ ├── MJPropertyType.h │ │ │ ├── NSObject+MJClass.h │ │ │ ├── NSObject+MJCoding.h │ │ │ ├── NSObject+MJKeyValue.h │ │ │ ├── NSObject+MJProperty.h │ │ │ └── NSString+MJExtension.h │ │ │ └── SDWebImage │ │ │ ├── NSData+ImageContentType.h │ │ │ ├── NSImage+WebCache.h │ │ │ ├── SDImageCache.h │ │ │ ├── SDImageCacheConfig.h │ │ │ ├── SDWebImageCompat.h │ │ │ ├── SDWebImageDecoder.h │ │ │ ├── SDWebImageDownloader.h │ │ │ ├── SDWebImageDownloaderOperation.h │ │ │ ├── SDWebImageManager.h │ │ │ ├── SDWebImageOperation.h │ │ │ ├── SDWebImagePrefetcher.h │ │ │ ├── UIButton+WebCache.h │ │ │ ├── UIImage+GIF.h │ │ │ ├── UIImage+MultiFormat.h │ │ │ ├── UIImageView+HighlightedWebCache.h │ │ │ ├── UIImageView+WebCache.h │ │ │ ├── UIView+WebCache.h │ │ │ └── UIView+WebCacheOperation.h │ ├── MJExtension │ │ ├── LICENSE │ │ ├── MJExtension │ │ │ ├── MJExtension.h │ │ │ ├── MJExtensionConst.h │ │ │ ├── MJExtensionConst.m │ │ │ ├── MJFoundation.h │ │ │ ├── MJFoundation.m │ │ │ ├── MJProperty.h │ │ │ ├── MJProperty.m │ │ │ ├── MJPropertyKey.h │ │ │ ├── MJPropertyKey.m │ │ │ ├── MJPropertyType.h │ │ │ ├── MJPropertyType.m │ │ │ ├── NSObject+MJClass.h │ │ │ ├── NSObject+MJClass.m │ │ │ ├── NSObject+MJCoding.h │ │ │ ├── NSObject+MJCoding.m │ │ │ ├── NSObject+MJKeyValue.h │ │ │ ├── NSObject+MJKeyValue.m │ │ │ ├── NSObject+MJProperty.h │ │ │ ├── NSObject+MJProperty.m │ │ │ ├── NSString+MJExtension.h │ │ │ └── NSString+MJExtension.m │ │ └── README.md │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ ├── SDWebImage │ │ ├── LICENSE │ │ ├── README.md │ │ └── SDWebImage │ │ │ ├── NSData+ImageContentType.h │ │ │ ├── NSData+ImageContentType.m │ │ │ ├── NSImage+WebCache.h │ │ │ ├── NSImage+WebCache.m │ │ │ ├── SDImageCache.h │ │ │ ├── SDImageCache.m │ │ │ ├── SDImageCacheConfig.h │ │ │ ├── SDImageCacheConfig.m │ │ │ ├── SDWebImageCompat.h │ │ │ ├── SDWebImageCompat.m │ │ │ ├── SDWebImageDecoder.h │ │ │ ├── SDWebImageDecoder.m │ │ │ ├── SDWebImageDownloader.h │ │ │ ├── SDWebImageDownloader.m │ │ │ ├── SDWebImageDownloaderOperation.h │ │ │ ├── SDWebImageDownloaderOperation.m │ │ │ ├── SDWebImageManager.h │ │ │ ├── SDWebImageManager.m │ │ │ ├── SDWebImageOperation.h │ │ │ ├── SDWebImagePrefetcher.h │ │ │ ├── SDWebImagePrefetcher.m │ │ │ ├── UIButton+WebCache.h │ │ │ ├── UIButton+WebCache.m │ │ │ ├── UIImage+GIF.h │ │ │ ├── UIImage+GIF.m │ │ │ ├── UIImage+MultiFormat.h │ │ │ ├── UIImage+MultiFormat.m │ │ │ ├── UIImageView+HighlightedWebCache.h │ │ │ ├── UIImageView+HighlightedWebCache.m │ │ │ ├── UIImageView+WebCache.h │ │ │ ├── UIImageView+WebCache.m │ │ │ ├── UIView+WebCache.h │ │ │ ├── UIView+WebCache.m │ │ │ ├── UIView+WebCacheOperation.h │ │ │ └── UIView+WebCacheOperation.m │ └── Target Support Files │ │ ├── AFNetworking │ │ ├── AFNetworking-dummy.m │ │ ├── AFNetworking-prefix.pch │ │ └── AFNetworking.xcconfig │ │ ├── CocoaSecurity │ │ ├── CocoaSecurity-dummy.m │ │ ├── CocoaSecurity-prefix.pch │ │ └── CocoaSecurity.xcconfig │ │ ├── MJExtension │ │ ├── MJExtension-dummy.m │ │ ├── MJExtension-prefix.pch │ │ └── MJExtension.xcconfig │ │ ├── Pods-XCWallpaper │ │ ├── Pods-XCWallpaper-acknowledgements.markdown │ │ ├── Pods-XCWallpaper-acknowledgements.plist │ │ ├── Pods-XCWallpaper-dummy.m │ │ ├── Pods-XCWallpaper-frameworks.sh │ │ ├── Pods-XCWallpaper-resources.sh │ │ ├── Pods-XCWallpaper.debug.xcconfig │ │ └── Pods-XCWallpaper.release.xcconfig │ │ └── SDWebImage │ │ ├── SDWebImage-dummy.m │ │ ├── SDWebImage-prefix.pch │ │ └── SDWebImage.xcconfig ├── README.md ├── XCWallpaper.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── XCWallpaper.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Day38- NSResponderChain ├── README.md └── ResponderChainDemo │ ├── ResponderChainDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── ResponderChainDemo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── ResponderChainDemo.entitlements │ ├── ViewController.h │ ├── ViewController.m │ ├── XCResponseView.h │ ├── XCResponseView.m │ └── main.m ├── Day4- NSView ├── NSView.key └── NSViewDemo │ ├── NSViewDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── NSViewDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── ColorView.swift │ ├── Info.plist │ └── ViewController.swift ├── Day5- NSButton ├── NSButtonDemo │ ├── NSButtonDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── NSButtonDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── tab-noti-active.imageset │ │ │ ├── Contents.json │ │ │ └── tab-noti-active@2x.png │ │ └── tab-noti.imageset │ │ │ ├── Contents.json │ │ │ └── tab-noti@2x.png │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift ├── tab-noti-active@2x.png └── tab-noti@2x.png ├── Day6- NSImageView ├── NSImageViewDemo │ ├── NSImageViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── NSImageViewDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── apple.imageset │ │ │ ├── Contents.json │ │ │ └── apple.png │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── ClickImageView.swift │ │ ├── Info.plist │ │ ├── ViewController.swift │ │ └── timg.gif ├── apple.png └── timg.gif ├── Day7- NSCollectionView ├── NSCollectionViewDemo │ ├── NSCollectionViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── NSCollectionViewDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── templet0.imageset │ │ │ ├── Contents.json │ │ │ └── templet0.png │ │ ├── templet1.imageset │ │ │ ├── Contents.json │ │ │ └── templet1.png │ │ ├── templet10.imageset │ │ │ ├── Contents.json │ │ │ └── templet10.png │ │ ├── templet2.imageset │ │ │ ├── Contents.json │ │ │ └── templet2.png │ │ ├── templet3.imageset │ │ │ ├── Contents.json │ │ │ └── templet3.png │ │ ├── templet4.imageset │ │ │ ├── Contents.json │ │ │ └── templet4.png │ │ ├── templet5.imageset │ │ │ ├── Contents.json │ │ │ └── templet5.png │ │ ├── templet6.imageset │ │ │ ├── Contents.json │ │ │ └── templet6.png │ │ ├── templet7.imageset │ │ │ ├── Contents.json │ │ │ └── templet7.png │ │ ├── templet8.imageset │ │ │ ├── Contents.json │ │ │ └── templet8.png │ │ └── templet9.imageset │ │ │ ├── Contents.json │ │ │ └── templet9.png │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── HeaderView.swift │ │ ├── HeaderView.xib │ │ ├── Info.plist │ │ ├── NumberItem.swift │ │ ├── NumberItem.xib │ │ └── ViewController.swift └── templetImage │ ├── templet0.png │ ├── templet1.png │ ├── templet10.png │ ├── templet2.png │ ├── templet3.png │ ├── templet4.png │ ├── templet5.png │ ├── templet6.png │ ├── templet7.png │ ├── templet8.png │ └── templet9.png ├── Day8- NSTableView ├── .DS_Store ├── DataSouce&Delegate.png ├── NSTableViewDemo │ ├── .DS_Store │ ├── NSTableViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── NSTableViewDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── headIcon0.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon0.jpg │ │ ├── headIcon1.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon1.jpg │ │ ├── headIcon10.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon10.jpg │ │ ├── headIcon11.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon11.jpg │ │ ├── headIcon12.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon12.jpg │ │ ├── headIcon2.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon2.jpg │ │ ├── headIcon3.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon3.jpg │ │ ├── headIcon4.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon4.jpg │ │ ├── headIcon5.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon5.jpg │ │ ├── headIcon6.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon6.jpg │ │ ├── headIcon7.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon7.png │ │ ├── headIcon8.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon8.jpg │ │ └── headIcon9.imageset │ │ │ ├── Contents.json │ │ │ └── headIcon9.jpg │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MYCellView.swift │ │ ├── MYCellView.xib │ │ └── ViewController.swift ├── TableView section.png └── headIcion │ ├── Property List.plist │ ├── headIcon0.jpg │ ├── headIcon1.jpg │ ├── headIcon10.jpg │ ├── headIcon11.jpg │ ├── headIcon12.jpg │ ├── headIcon2.jpg │ ├── headIcon3.jpg │ ├── headIcon4.jpg │ ├── headIcon5.jpg │ ├── headIcon6.jpg │ ├── headIcon7.png │ ├── headIcon8.jpg │ └── headIcon9.jpg ├── Day9- NSWindow └── NSWindowDemo │ ├── NSWindowDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── NSWindowDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Q&A └── Demo │ ├── Demo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── Demo │ ├── AddController.swift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── Name.swift │ ├── Phelps.swift │ ├── ScoreModel.swift │ ├── SportModel.swift │ ├── SunYang.swift │ ├── ViewController.swift │ ├── ViewController1.swift │ └── ViewController2.swift └── Q&A01- OpenGL └── Cocoa&OpenGL ├── Cocoa&OpenGL.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist └── Cocoa&OpenGL ├── AppDelegate.swift ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json └── Contents.json ├── Base.lproj └── Main.storyboard ├── Cocoa_OpenGL.entitlements ├── Info.plist ├── MyGLView.swift ├── OpenGLReadMe.md └── ViewController.swift /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alexiuce 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 | -------------------------------------------------------------------------------- /macOS-dev/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day10- NSApplication/NSApplicationDemo/NSApplicationDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day11- NSDocment/NSDocumentDemo/NSDocumentDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day11- NSDocment/NSDocumentDemo/NSDocumentDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSDocumentDemo 4 | // 5 | // Created by Alexcai on 2017/8/19. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day11- NSDocment/NSDocumentDemo/NSDocumentDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // NSDocumentDemo 4 | // 5 | // Created by Alexcai on 2017/8/19. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | @IBOutlet var textView: NSTextView! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | // Do any additional setup after loading the view. 19 | } 20 | 21 | override var representedObject: Any? { 22 | didSet { 23 | // Update the view, if already loaded. 24 | } 25 | } 26 | 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /macOS-dev/Day12- NSTextField/NSTextFieldDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day12- NSTextField/NSTextFieldDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day12- NSTextField/NSTextFieldDemo/NSTextFieldDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day12- NSTextField/NSTextFieldDemo/NSTextFieldDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSTextFieldDemo 4 | // 5 | // Created by Alexcai on 2017/8/20. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day13- NSTextView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day13- NSTextView/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day13- NSTextView/NSTextViewDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day13- NSTextView/NSTextViewDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day13- NSTextView/NSTextViewDemo/NSTextViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day13- NSTextView/NSTextViewDemo/NSTextViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSTextViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/20. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day13- NSTextView/note.md: -------------------------------------------------------------------------------- 1 | # NSTextView 文本编辑控件 2 | 3 | ### NSTextField 与NSTextView的差异 4 | * 父类不同 5 | > NSTextField 继承自 NSControl 6 | NSTextView 继承自 NSText 7 | * 对特定键盘的响应事件不同 8 | 9 | > enter 键: NSTextField结束编辑,而NSTextView是换行 10 | Tab 键: NSTextField中会切换到下个控件,NSTextView则在文本中插入Tab字符 11 | * 对特定的符号显示效果 12 | > ' 和 " 在NSTextField中都可以正常显示,但在NSTextView中,默认会将直引号(英文引号)变成弯引号(中文引号) 13 | NSTextField: 轻量级控件,提供简单的文字输入处理. 14 | NSTextView: 重量级控件,提供更复杂的文字处理功能和设置选项. 15 | * 对属性文字(富文本)支持不同 16 | 17 | > NSTextField中,编辑状态,不支持富文本 18 | NSTextView编辑状态支持富文本 -------------------------------------------------------------------------------- /macOS-dev/Day14- NSAlert/NSAlertDemo/NSAlertDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day14- NSAlert/NSAlertDemo/NSAlertDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSAlertDemo 4 | // 5 | // Created by Alexcai on 2017/8/21. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day14- NSAlert/NSAlertDemo/NSAlertDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day14- NSAlert/NSAlertDemo/NSAlertDemo/Assets.xcassets/alert.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "alert.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day14- NSAlert/NSAlertDemo/NSAlertDemo/Assets.xcassets/alert.imageset/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day14- NSAlert/NSAlertDemo/NSAlertDemo/Assets.xcassets/alert.imageset/alert.png -------------------------------------------------------------------------------- /macOS-dev/Day15- NSPopOver/NSPopoverDemo/NSPopoverDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day15- NSPopOver/NSPopoverDemo/NSPopoverDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSPopoverDemo 4 | // 5 | // Created by Alexcai on 2017/8/22. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day16- NSMenu/NSMenu.md: -------------------------------------------------------------------------------- 1 | # NSMenu 菜单栏的使用 2 | 3 | ### 使用场景: 4 | 5 | 6 | * App的菜单: 系统会提供一下默认的菜单项 7 | 8 | 9 | * 控件的右键显示菜单: 应用本身提供一些快捷的操作项目 10 | 11 | * 控件的左键菜单: (一般用的比较少,但也会偶尔使用) 12 | 13 | 14 | * Dock栏上的菜单: 系统有默认的菜单项,应用可以添加额外的菜单项目 -------------------------------------------------------------------------------- /macOS-dev/Day16- NSMenu/NSMenuDemo/NSMenuDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day16- NSMenu/NSMenuDemo/NSMenuDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSMenuDemo 4 | // 5 | // Created by Alexcai on 2017/8/23. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | // 1.实现这个方法,并返回一个自己定义的NSMenu 就可以支持在Dock上给APP添加菜单 25 | // func applicationDockMenu(_ sender: NSApplication) -> NSMenu? { 26 | // let dockMenu = NSMenu(title: "dock") 27 | // // 2. 创建要添加的菜单项目 28 | // let myItem = NSMenuItem(title: "我的设置", action: #selector(clickSetting), keyEquivalent: "") 29 | // dockMenu.addItem(myItem) 30 | // return dockMenu 31 | // } 32 | 33 | } 34 | 35 | extension AppDelegate{ 36 | func clickSetting() { 37 | print("点击了Dock的设置选项") 38 | } 39 | 40 | } 41 | 42 | -------------------------------------------------------------------------------- /macOS-dev/Day17- NSContainerView/NSContainerView.md: -------------------------------------------------------------------------------- 1 | # NSContainerView : 特殊的容器视图 2 | 3 | * 在macOS中并没有这个类,它是一种特殊的NSView 4 | * NSContainerView 不能使用代码创建,仅在Storyboard中提供使用 5 | 6 | * 优点: 7 | 1.解耦: 8 | 从MVC架构上看,NSContainerView将一个视图的内容单独分离到一个控制中进行管理,避免了在主控制器中添加过多UI和数据逻辑代码 9 | 10 | 2.便于将一个复杂的视图分成几个独立的视图 11 | * 不足: 12 | NSContainerView 只支持一个Embed的NSViewController 13 | 这在管理多个控制器界面时,会显得不方便. 14 | 15 | -------------------------------------------------------------------------------- /macOS-dev/Day17- NSContainerView/NSContainerViewDemo/NSContainerViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day17- NSContainerView/NSContainerViewDemo/NSContainerViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSContainerViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/24. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day18- NSSlider/NSSlierDemo/NSSlierDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day18- NSSlider/NSSlierDemo/NSSlierDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSSlierDemo 4 | // 5 | // Created by Alexcai on 2017/8/25. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day18- NSSlider/NSSlierDemo/NSSlierDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day18- NSSlider/NSSlierDemo/NSSlierDemo/Assets.xcassets/indator.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "indator.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day18- NSSlider/NSSlierDemo/NSSlierDemo/Assets.xcassets/indator.imageset/indator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day18- NSSlider/NSSlierDemo/NSSlierDemo/Assets.xcassets/indator.imageset/indator.png -------------------------------------------------------------------------------- /macOS-dev/Day18- NSSlider/Slider.md: -------------------------------------------------------------------------------- 1 | # NSSlider 控件 2 | 3 | 4 | 5 | ### 作用: 6 | > 显示在一段范围内的取值UI控件 7 | 8 | ### 类型: 9 | 10 | > 依据操作方向: 11 | * 水平Slider : 支持显示刻度,支持设置刻度的位置 12 | * 垂直Slider : 支持显示刻度,支持设置刻度的位置 13 | * 圆形Slider : 不支持显示刻度 14 | 15 | 16 | 17 | ### 结构 18 | * 内部使用NSSliderCell 19 | 20 | ### 继承: 21 | * 继承自NSControl 22 | 23 | ### 自定义NSSlider 24 | 25 | * 设置指定的指示图标 26 | 27 | * 设置指定指示标识左右两边的颜色 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /macOS-dev/Day19- NSOpenPanel/NSOpenPanel.md: -------------------------------------------------------------------------------- 1 | # NSOpenPanel 打开文件路径选择控件 2 | 3 | * 继承自`NSSavePanel`(**保存文件路径选择控件**) 4 | * 是一种特殊的`NSWindow`(`NSSavePanel` <- `NSPanel` <- `NSWindow`) 5 | 6 | 7 | ### 显示方式 8 | * 内嵌式: 9 | > 在当前Window中已sheet的形式显示 10 | 调用方法: `beginSheetModal` 11 | 返回结果: 在闭包中执行回调 12 | * 独立式: 13 | > 以独立的窗口显示 14 | 调用方法: `runModal` 15 | 返回结果: 根据调用方法的返回值(`NSModalResponseOK`)进行判断处理 16 | ### 常用属性 17 | 18 | * `prompt` : 默认按钮的文字(默认值为"open") 19 | * `message` : 提示文字 20 | * `canChooseDirectories`: 是否支持选择文件夹 21 | * `allowsMultipleSelection`: 是否支持多选 22 | * `canChooseFiles`: 是否支持选择文件 23 | * `directoryURL` : 默认文件夹路径 24 | * `canCreateDirectories` : 是否支持新建文件夹 25 | 26 | ### 沙盒环境 27 | 28 | > 在沙盒环境中,NSOpenPanel是处于在独立的进程(不是Appkit创建的),当用户选择文件后,由macOS操作系统将用户选择的文件,添加到App的沙盒中 29 | 30 | -------------------------------------------------------------------------------- /macOS-dev/Day19- NSOpenPanel/NSOpenPanelDemo/NSOpenPanelDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day19- NSOpenPanel/NSOpenPanelDemo/NSOpenPanelDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSOpenPanelDemo 4 | // 5 | // Created by Alexcai on 2017/8/26. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day2 - Storyboard/StoryboadDemo/StoryboadDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day2 - Storyboard/StoryboadDemo/StoryboadDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // StoryboadDemo 4 | // 5 | // Created by Alexcai on 2017/8/12. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day2 - Storyboard/StoryboadDemo/StoryboadDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // StoryboadDemo 4 | // 5 | // Created by Alexcai on 2017/8/12. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override var representedObject: Any? { 20 | didSet { 21 | // Update the view, if already loaded. 22 | } 23 | } 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/CocoapodDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/CocoapodDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/CocoapodDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CocoapodDemo 4 | // 5 | // Created by Alexcai on 2017/8/26. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/CocoapodDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CocoapodDemo 4 | // 5 | // Created by Alexcai on 2017/8/26. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | //import SnapKit 11 | 12 | 13 | class ViewController: NSViewController { 14 | 15 | @IBOutlet weak var myLabel: NSTextField! 16 | 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | // myLabel.snp.makeConstraints { (make) in 22 | // make.bottom.equalTo(view).offset(-10) 23 | // make.right.equalTo(view).offset(-10) 24 | // } 25 | 26 | 27 | // Do any additional setup after loading the view. 28 | } 29 | 30 | override var representedObject: Any? { 31 | didSet { 32 | // Update the view, if already loaded. 33 | } 34 | } 35 | 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :osx, '10.12' 3 | 4 | target 'CocoapodDemo' do 5 | # 入股使用Objective-C环境,要注释掉下面的语句 6 | use_frameworks! 7 | 8 | # Pods for CocoapodDemo 9 | 10 | # 这里添加第三方库 11 | 12 | pod 'SnapKit', '~> 3.2.0' 13 | 14 | end 15 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SnapKit (3.2.0) 3 | 4 | DEPENDENCIES: 5 | - SnapKit (~> 3.2.0) 6 | 7 | SPEC CHECKSUMS: 8 | SnapKit: 1ca44df72cfa543218d177cb8aab029d10d86ea7 9 | 10 | PODFILE CHECKSUM: c9996a7b084c3a199dc1a5991015e6e63068390b 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SnapKit (3.2.0) 3 | 4 | DEPENDENCIES: 5 | - SnapKit (~> 3.2.0) 6 | 7 | SPEC CHECKSUMS: 8 | SnapKit: 1ca44df72cfa543218d177cb8aab029d10d86ea7 9 | 10 | PODFILE CHECKSUM: c9996a7b084c3a199dc1a5991015e6e63068390b 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/Pods-CocoapodDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/Pods-CocoapodDemo/Pods-CocoapodDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CocoapodDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CocoapodDemo 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/Pods-CocoapodDemo/Pods-CocoapodDemo-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_CocoapodDemoVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_CocoapodDemoVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/Pods-CocoapodDemo/Pods-CocoapodDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CODE_SIGN_IDENTITY = 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/Pods-CocoapodDemo/Pods-CocoapodDemo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CocoapodDemo { 2 | umbrella header "Pods-CocoapodDemo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/Pods-CocoapodDemo/Pods-CocoapodDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CODE_SIGN_IDENTITY = 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/SnapKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SnapKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/SnapKit/SnapKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SnapKit { 2 | umbrella header "SnapKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/CocoapodDemo/Pods/Target Support Files/SnapKit/SnapKit.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SnapKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /macOS-dev/Day20- Cocoapod/cocoapod安装.md: -------------------------------------------------------------------------------- 1 | # cocoapod 第三方库管理工具 2 | 3 | 4 | ### ruby 环境 5 | `ruby -v` 查看ruby版本 6 | 7 | ### gem源 8 | `gem sources -l` : 查看已经添加的源地址 9 | 10 | > 淘宝源https://ruby.taobao.org/ 已经停止维护了,需要使用https://gems.ruby-china.org/ 作为gem源 11 | 12 | `sudo gem sources --add https://gems.ruby-china.org/ --remove https://ruby.taobao.org/` : 添加ruby-china源,并删除淘宝的源 13 | 14 | ### 安装cocoapod 15 | `sudo gem install cocoapods` : 安装cocoapod 16 | 17 | * 错误处理 Operation not permitted - /usr/bin/xcodeproj 18 | 19 | 执行`sudo gem install -n /usr/local/bin cocoapods` 20 | 21 | 22 | `pod setup` : 初始化cocoapod 主仓库 23 | 24 | 25 | ### 使用cocoapod 26 | 1. 在项目工程目录中执行命令 27 | `pod init` : 创建`podfile`文件 28 | 2. 编辑podfile ,添加需要的第三方库 29 | 3. 执行 `pod update --no-repo-update` 30 | 4. 运行workspace文件 31 | 32 | 33 | ### 去除cocoapod 34 | 35 | 1. 执行`pod deintegrate` 命令: 从项目中去除cocoapod 36 | 2. 删除剩余的workspace和pod文件 37 | 3. 运行xcodeproj工程即可 38 | -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/NSStatusBar.md: -------------------------------------------------------------------------------- 1 | # NSStatusBar 的基本使用 2 | 3 | ### 简介 4 | > NSStatusBar是用来管理显示在系统状态栏上的NSStatusItem的类,它继承自NSObject 5 | 6 | 7 | ### NSStautsItem 8 | > 一个NSStatusItem对象表示显示在NSStatusBar上的一个元素 9 | * 创建方法: 10 | 11 | `statusItem(withLength:)` :这个方法将自动添加一个新的NSStatusItem到NSStatusBar中 12 | 13 | > NSStatusItem内部拥有一个NSButton,用来设置外观和响应事件 -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/NSStatusBarDemo/NSStatusBarDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/NSStatusBarDemo/NSStatusBarDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSStatusBarDemo 4 | // 5 | // Created by Alexcai on 2017/8/26. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | 19 | 20 | // Do any additional setup after loading the view. 21 | 22 | } 23 | 24 | func applicationWillTerminate(_ aNotification: Notification) { 25 | // Insert code here to tear down your application 26 | } 27 | 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/NSStatusBarDemo/NSStatusBarDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/NSStatusBarDemo/NSStatusBarDemo/Assets.xcassets/icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/NSStatusBarDemo/NSStatusBarDemo/Assets.xcassets/icon.imageset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day21 - NSStatusBar/NSStatusBarDemo/NSStatusBarDemo/Assets.xcassets/icon.imageset/icon.png -------------------------------------------------------------------------------- /macOS-dev/Day21 - NSStatusBar/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day21 - NSStatusBar/icon.png -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day22- Custom View/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/CustomView.md: -------------------------------------------------------------------------------- 1 | # Custom View 自定义视图 2 | 3 | 4 | ### 自定义视图 5 | > 当系统提供的控件无法满足需求时,我们通常需要对视图进行定制,这在项目开发中,是非常普遍的现象. 6 | 7 | 示例饼图: 8 | ![](https://ws2.sinaimg.cn/large/006tNc79ly1fiy93ejetaj30e80e8dg0.jpg) 9 | 10 | * Storyboard中提供了一个继承自NSView的Custom View 控件 11 | 12 | 13 | ### 自定义视图的步骤 14 | 15 | * 继承父类视图(通常是NSView) 16 | 17 | * 重写drawRect方法 18 | 19 | * 示例项目1: 定义一个支持设置背景色的View 20 | * 示例项目2: 定义一个饼图View 21 | 22 | 23 | ### Core Animation 定制 layer-backed View 24 | 25 | * 继承NSView 26 | * 重写属性和方法 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/CustomViewDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day22- Custom View/CustomViewDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/CustomViewDemo/CustomViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/CustomViewDemo/CustomViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CustomViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/27. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/CustomViewDemo/CustomViewDemo/MYBackgroundView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MYBackgroundView.swift 3 | // CustomViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/27. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class MYBackgroundView: NSView { 12 | 13 | 14 | var backgroundColor = NSColor.lightGray{ 15 | didSet{ 16 | // 设置背景色属性后,刷新视图,不要手动调用这个 draw(<#T##dirtyRect: NSRect##NSRect#>)方法 17 | 18 | /** 这个属性为true ,就会让系统自动调用draw方法,进行视图的刷新*/ 19 | needsDisplay = true 20 | // 相当于Objective-C的这个方法: [setNeedDisaplay: YES] 21 | 22 | } 23 | } 24 | 25 | 26 | 27 | 28 | override func draw(_ dirtyRect: NSRect) { 29 | super.draw(dirtyRect) 30 | // 对视图的自定义绘制,需要在这个方法中进行 31 | // 当视图需要显示或者刷新时,系统会自动调用这个方法 32 | 33 | let backgroundPath = NSBezierPath(rect: dirtyRect) 34 | backgroundColor.set() 35 | backgroundPath.fill() 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/CustomViewDemo/CustomViewDemo/NSBezierPath-extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezierPath-extension.swift 3 | // 123 4 | // 5 | // Created by Alexcai on 2017/8/27. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AppKit 11 | 12 | extension NSBezierPath { 13 | public var cgPath: CGPath { 14 | let path = CGMutablePath() 15 | var points = [CGPoint](repeating: .zero, count: 3) 16 | 17 | for i in 0 ..< self.elementCount { 18 | let type = self.element(at: i, associatedPoints: &points) 19 | switch type { 20 | case .moveToBezierPathElement: 21 | path.move(to: points[0]) 22 | case .lineToBezierPathElement: 23 | path.addLine(to: points[0]) 24 | case .curveToBezierPathElement: 25 | path.addCurve(to: points[2], control1: points[0], control2: points[1]) 26 | case .closePathBezierPathElement: 27 | path.closeSubpath() 28 | } 29 | } 30 | 31 | return path 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /macOS-dev/Day22- Custom View/NSBezierPath-extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezierPath-extension.swift 3 | // 123 4 | // 5 | // Created by Alexcai on 2017/8/27. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AppKit 11 | 12 | extension NSBezierPath { 13 | public var cgPath: CGPath { 14 | let path = CGMutablePath() 15 | var points = [CGPoint](repeating: .zero, count: 3) 16 | 17 | for i in 0 ..< self.elementCount { 18 | let type = self.element(at: i, associatedPoints: &points) 19 | switch type { 20 | case .moveToBezierPathElement: 21 | path.move(to: points[0]) 22 | case .lineToBezierPathElement: 23 | path.addLine(to: points[0]) 24 | case .curveToBezierPathElement: 25 | path.addCurve(to: points[2], control1: points[0], control2: points[1]) 26 | case .closePathBezierPathElement: 27 | path.closeSubpath() 28 | } 29 | } 30 | 31 | return path 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /macOS-dev/Day23- CocoaBind/Cocoa Bind.md: -------------------------------------------------------------------------------- 1 | # Cocoa Binding - macOS专有的数据驱动视图方式 2 | 3 | * 对 M(odel)-V(iew)-C(ontroller) 模式的补充 4 | 5 | * 目的: 实现视图与数据的互动 6 | > 数据变化时,视图更新展示的内容 7 | > 视图修改内容时,同步更新数据 8 | 9 | * KVO 10 | 11 | 12 | * 视图绑定到模型 13 | 14 | * 视图绑定到控制器 15 | 16 | > NSUserDefaults 用来存储用户的偏好设置 17 | NSUserDefaults 不支持KVO方式 ,无法直接对它进行Cocoa 绑定 18 | NSUserDefaultController : 通过这个Controller,可以实现绑定数据到NSUserDefaults中 19 | 20 | 21 | -------------------------------------------------------------------------------- /macOS-dev/Day23- CocoaBind/CocoaBindingDemo/CocoaBindingDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day23- CocoaBind/CocoaBindingDemo/CocoaBindingDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CocoaBindingDemo 4 | // 5 | // Created by Alexcai on 2017/8/28. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day23- CocoaBind/CocoaBindingDemo/CocoaBindingDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CocoaBindingDemo 4 | // 5 | // Created by Alexcai on 2017/8/28. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | @IBOutlet var dataLabel:NSTextField! 14 | 15 | /** Swift 中,默认情况下,成员属性不支持KVO,如果希望该属性可以进行键值观察(KVO),需要添加关键字dynamic进行声明 16 | */ 17 | dynamic var studentCount = 10 18 | 19 | // @IBOutlet weak var myLabel: NSTextField! 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | // Do any additional setup after loading the view. 24 | } 25 | 26 | 27 | // @IBAction func changeSlider(_ sender: NSSlider) { 28 | // 29 | // myLabel.stringValue = "\(sender.intValue)" 30 | // 31 | // } 32 | @IBAction func changeCount(_ sender: Any) { 33 | 34 | studentCount = Int(arc4random_uniform(100)) 35 | 36 | } 37 | 38 | 39 | @IBAction func showDate(_ sender: Any) { 40 | dataLabel.stringValue = "\(studentCount)" 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /macOS-dev/Day24- NSToolBar/NSTooBarDemo/NSTooBarDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day24- NSToolBar/NSTooBarDemo/NSTooBarDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSTooBarDemo 4 | // 5 | // Created by Alexcai on 2017/8/28. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day24- NSToolBar/NSTooBarDemo/NSTooBarDemo/MYWindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MYWindowController.swift 3 | // NSTooBarDemo 4 | // 5 | // Created by Alexcai on 2017/8/28. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class MYWindowController: NSWindowController { 12 | 13 | override func windowDidLoad() { 14 | super.windowDidLoad() 15 | 16 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 17 | } 18 | // @IBAction func clickMyToolBarItem(_ sender: Any) { 19 | // print("点击了window的item") 20 | // } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /macOS-dev/Day24- NSToolBar/NSToolBar.md: -------------------------------------------------------------------------------- 1 | # NSToolBar : 工具栏控件 2 | 3 | * 显示位置: 窗口的的标题栏下面 4 | * 支持用户定义 5 | * 在Storyboard中的两种添加方式 6 | 7 | -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day25- NSViewController/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/NSViewController - 视图控制器.md: -------------------------------------------------------------------------------- 1 | ### NSViewController - 视图控制器 2 | 3 | * 在目前的macOS 系统中,cocoa没有提供iOS系统中UITabBarController 和UINavigaitonController 对应的控制器 4 | 5 | > macOS 10.10 之前: 控制器对view的管理方式是重写loadView方法(需要调用super方法),在这个方法中加载nib视图,然后赋值给控制器的view属性 6 | 7 | 8 | 9 | 10 | > macOS 10.10 之后 : loadView方法会自动在bundle中寻找与控制器名字相同的nib文件 11 | 12 | **对view的生命周期的管理** (macOS 10.10 + ) 13 | 14 | * viewDidLoad() 15 | * viewWillAppear() 16 | * viewDidAppear() 17 | * updateViewConstraints() 18 | 19 | * viewWillLayout() 20 | 21 | * viewDidLayout() 22 | * viewWillDisappear() 23 | * viewDidDisappear() 24 | 25 | 26 | **NSViewController转场** 27 | 28 | transition 29 | 30 | **PresentControler的四种方式** 31 | 32 | modal : 以独立窗口的形式显示新的控制器界面 33 | sheet : 内嵌在当前window中的形式显示新的控制器界面 34 | popover : 已popover形式显示 35 | custom : 自定义显示方式 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/NSViewControllerDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day25- NSViewController/NSViewControllerDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/NSViewControllerDemo/NSViewControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/NSViewControllerDemo/NSViewControllerDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/NSViewControllerDemo/NSViewControllerDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSViewControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/29. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day25- NSViewController/NSViewControllerDemo/NSViewControllerDemo/MYFirstController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MYFirstController.swift 3 | // NSViewControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/29. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class MYFirstController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do view setup here. 16 | } 17 | @IBAction func dismiss(_ sender: Any) { 18 | dismissViewController(self) 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day26-NSWindowController/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/NSWindowController : 窗口控制器.md: -------------------------------------------------------------------------------- 1 | ### NSWindowController : 窗口控制器 2 | 3 | 4 | **控制器的管理细节** 5 | 6 | * 加载和显示窗口 7 | * 关闭窗口 8 | * 设置窗口的标题 9 | * 存储窗口的frame 10 | * 窗口的层叠关系 11 | 12 | **App的设置窗口** -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/NSWindowControllerDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day26-NSWindowController/NSWindowControllerDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/NSWindowControllerDemo/NSWindowControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/NSWindowControllerDemo/NSWindowControllerDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSWindowControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/29. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/NSWindowControllerDemo/NSWindowControllerDemo/MYContentController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MYContentController.swift 3 | // NSWindowControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/29. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class MYContentController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do view setup here. 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /macOS-dev/Day26-NSWindowController/NSWindowControllerDemo/NSWindowControllerDemo/NewWindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NewWindowController.swift 3 | // NSWindowControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/29. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class NewWindowController: NSWindowController { 12 | 13 | override func windowDidLoad() { 14 | super.windowDidLoad() 15 | 16 | // 设置窗口控制器要显示到内容控制器 17 | contentViewController = MYContentController() 18 | 19 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /macOS-dev/Day27- NSArrayController/NSArrayController.md: -------------------------------------------------------------------------------- 1 | # NSArrayController : (Cocoa Binding 中用于管理数组到控制器) 2 | 3 | 4 | * arrangedObjects : 表示数组中整个对象的集合 5 | 6 | * selection : 选中的对象 7 | 8 | > 要使用这些属性,可以将它们用做Bind时的控制器键 -------------------------------------------------------------------------------- /macOS-dev/Day27- NSArrayController/NSArrayControllerDemo/NSArrayControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day27- NSArrayController/NSArrayControllerDemo/NSArrayControllerDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSArrayControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/30. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day27- NSArrayController/NSArrayControllerDemo/NSArrayControllerDemo/Student.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Student.swift 3 | // NSArrayControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/30. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class Student: NSObject { 12 | var name = "Alexiuce" 13 | var courceName = "macOS" 14 | var courceCreateDate = Date() 15 | 16 | } 17 | -------------------------------------------------------------------------------- /macOS-dev/Day27- NSArrayController/NSArrayControllerDemo/NSArrayControllerDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // NSArrayControllerDemo 4 | // 5 | // Created by Alexcai on 2017/8/30. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | var students : [Student] = [] 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | override var representedObject: Any? { 23 | didSet { 24 | // Update the view, if already loaded. 25 | } 26 | } 27 | 28 | 29 | } 30 | 31 | 32 | 33 | // MARK: - NSArrayController 绑定步骤 34 | 35 | /** 36 | 37 | 1. 必须让NSArrayController 知道要管理那个数组的数据 38 | 通过在把Bind页面中设置content Array 来确定 39 | 40 | 2 .必须让NSArrayController 知道被管理的数组中,数据是属于哪个类 41 | 在NSArrayController 的属性面板(注意不是绑定面板)中设置class name 为数组中对象所属于的类 42 | 43 | * 类名必须使用包含有命名空间的前缀,否则会报找不到这个类的错误信息(重点!!!) 44 | 通常是"项目名称."+"类的名称" 45 | 46 | */ 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /macOS-dev/Day28- WebView/WebViewDemo/WebViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day28- WebView/WebViewDemo/WebViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WebViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/30. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day28- WebView/webView.md: -------------------------------------------------------------------------------- 1 | # WebView : 多用于显示HTML内容的控件 2 | 3 | * 加载进度 4 | * 常用的代理方法 -------------------------------------------------------------------------------- /macOS-dev/Day29- EventHandling/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day29- EventHandling/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day29- EventHandling/EventHandlingDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day29- EventHandling/EventHandlingDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day29- EventHandling/NSEventHandlingDemo/NSEventHandlingDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day29- EventHandling/NSEventHandlingDemo/NSEventHandlingDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSEventHandlingDemo 4 | // 5 | // Created by Alexcai on 2017/9/1. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day29- EventHandling/NSEventHandlingDemo/NSEventHandlingDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // NSEventHandlingDemo 4 | // 5 | // Created by Alexcai on 2017/9/1. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override var representedObject: Any? { 20 | didSet { 21 | // Update the view, if already loaded. 22 | } 23 | } 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /macOS-dev/Day3- AutoLayout/AutoresizingDemo/AutoresizingDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day3- AutoLayout/AutoresizingDemo/AutoresizingDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day3- AutoLayout/AutoresizingDemo/AutoresizingDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AutoresizingDemo 4 | // 5 | // Created by Alexcai on 2017/8/12. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/App Icon & SandBox.md: -------------------------------------------------------------------------------- 1 | ### App Icon 2 | 3 | * 避免使用圆角矩形 4 | * 尽量与App 内容相关(否则可能会被拒审) 5 | * App Icon size 6 | 7 | ### SandBox 8 | * 上架App必须开启 9 | * 设置相应的权限 10 | * 网络 11 | * 硬件 12 | * 文件路径 13 | 14 | > 示例Demo : 创建文件夹 15 | 16 | * 应用内权限 17 | * 永久权限 -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/AppIconDemo/AppIconDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/AppIconDemo/AppIconDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AppIconDemo 4 | // 5 | // Created by Alexcai on 2017/9/1. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/AppIconDemo/AppIconDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AppIconDemo 4 | // 5 | // Created by Alexcai on 2017/9/1. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override var representedObject: Any? { 20 | didSet { 21 | // Update the view, if already loaded. 22 | } 23 | } 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/SandBoxDemo/SandBoxDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/SandBoxDemo/SandBoxDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SandBoxDemo 4 | // 5 | // Created by Alexcai on 2017/9/1. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/SandBoxDemo/SandBoxDemo/SandBoxDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-write 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day30- AppIcon&SandBox/aboutFinished.md: -------------------------------------------------------------------------------- 1 | # 结束语 2 | 3 | * 感谢 4 | * 23种常用类 5 | * 库管理 6 | * 上架相关 7 | 8 | 9 | * 遗漏 10 | 11 | ![](https://ws1.sinaimg.cn/large/006tNc79gy1fj6823qpjqj312g154h4d.jpg) 12 | 13 | 14 | * 后续: 15 | 16 | > 综合项目实战视频(计划中) 17 | 18 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TabViewControllerDemo 4 | // 5 | // Created by Alexcai on 2018/9/9. 6 | // Copyright © 2018年 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo/OneViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OneViewController.swift 3 | // TabViewControllerDemo 4 | // 5 | // Created by Alexcai on 2018/9/9. 6 | // Copyright © 2018年 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class OneViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do view setup here. 16 | view.layer?.backgroundColor = NSColor.orange.cgColor 17 | self.preferredContentSize = view.frame.size 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo/TabViewControllerDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo/TwoViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TwoViewController.swift 3 | // TabViewControllerDemo 4 | // 5 | // Created by Alexcai on 2018/9/9. 6 | // Copyright © 2018年 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class TwoViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do view setup here. 16 | view.layer?.backgroundColor = NSColor.red.cgColor 17 | self.preferredContentSize = view.frame.size 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /macOS-dev/Day31- NSTabViewController/TabViewControllerDemo/TabViewControllerDemo/XCSegmentedControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XCSegmentedControl.swift 3 | // TabViewControllerDemo 4 | // 5 | // Created by Alexcai on 2018/9/9. 6 | // Copyright © 2018年 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class XCSegmentedControl: NSSegmentedControl { 12 | 13 | override func draw(_ dirtyRect: NSRect) { 14 | super.draw(dirtyRect) 15 | 16 | // Drawing code here. 17 | } 18 | 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // VideoWatermarkDemo 4 | // 5 | // Created by Alexcai on 2018/9/25. 6 | // Copyright © 2018年 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/Group@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/Group@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/Group@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/Group@3x.png -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/VideoWatermarkDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // VideoWatermarkDemo 4 | // 5 | // Created by Alexcai on 2018/9/25. 6 | // Copyright © 2018年 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | let videoManager = XCVideoEidtManager(waterString: "WaterMark", waterPicture: "Group") 17 | 18 | guard let videoPath = Bundle.main.path(forResource: "video.mp4", ofType: nil, inDirectory: nil) else{return} 19 | 20 | let videoLocalUrl = URL(fileURLWithPath:videoPath) 21 | 22 | videoManager.addWatermark(videoPath: videoLocalUrl) 23 | 24 | } 25 | 26 | 27 | 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day32-VideoEidt/VideoWatermarkDemo/VideoWatermarkDemo/video.mp4 -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Day33- CaptureWindow 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow/Day33__CaptureWindow.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow/MouseDrawView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MouseDrawView.swift 3 | // Day33- CaptureWindow 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class MouseDrawView: NSView { 12 | 13 | override func draw(_ dirtyRect: NSRect) { 14 | super.draw(dirtyRect) 15 | 16 | 17 | // Drawing code here. 18 | } 19 | } 20 | 21 | 22 | extension MouseDrawView{ 23 | override func mouseDown(with event: NSEvent) { 24 | super.mouseDown(with: event) 25 | print("mouse down") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Day33- CaptureWindow 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | @IBOutlet weak var label: NSTextField! 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | guard let screenSize = NSScreen.main?.frame.size else { return } 18 | 19 | // view.layer?.backgroundColor = NSColor.red.cgColor 20 | view.frame = CGRect(x: 0, y: 0, width: screenSize.width, height: screenSize.height-22.0) 21 | label.frame = view.bounds; 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/Day33- CaptureWindow/XCWindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XCWindowController.swift 3 | // Day33- CaptureWindow 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class XCWindowController: NSWindowController { 12 | 13 | override func windowDidLoad() { 14 | super.windowDidLoad() 15 | window?.level = .statusBar 16 | // guard let wFrame = NSScreen.main?.frame else { return } 17 | // window?.isMovableByWindowBackground = true 18 | // window?.setFrame(wFrame, display: true) 19 | window?.backgroundColor = NSColor.clear 20 | 21 | 22 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ScreenCap 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ScreenCap 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 18 | // Insert code here to initialize your application 19 | } 20 | 21 | 22 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 23 | // Insert code here to tear down your application 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCap.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/ScreenCapture: -------------------------------------------------------------------------------- 1 | Versions/Current/ScreenCapture -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanel.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanel.nib -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanelBackGround.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanelBackGround.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanelBackGround_Up.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanelBackGround_Up.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanelSplit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/YascaControlPanelSplit.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/color_choose.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/color_choose.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_lbru.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_lbru.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_lr.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_lr.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_lurb.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_lurb.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_ub.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/Resources/mouse_resize_ub.tiff -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/ScreenCapture: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/A/ScreenCapture -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ScreenCapture.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ScreenCap 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | 13 | 14 | @interface ViewController : NSViewController 15 | 16 | 17 | 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ScreenCap 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | @class WWCaptureWindowController; 13 | 14 | @implementation ViewController 15 | 16 | - (void)viewDidLoad { 17 | [super viewDidLoad]; 18 | 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | 23 | - (void)setRepresentedObject:(id)representedObject { 24 | [super setRepresentedObject:representedObject]; 25 | 26 | // Update the view, if already loaded. 27 | } 28 | - (void)mouseDown:(NSEvent *)event{ 29 | // id Controller = NSClassFromString(@"WWCaptureWindowController"); 30 | // NSWindowController *vc = [[Controller alloc]init]; 31 | // [vc showWindow:nil]; 32 | 33 | } 34 | 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /macOS-dev/Day33- CaptureWindow/ScreenCap/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ScreenCap 4 | // 5 | // Created by Alexcai on 2018/10/3. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /macOS-dev/Day34-Gif/GifDemo/GifDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day34-Gif/GifDemo/GifDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day34-Gif/GifDemo/GifDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // GifDemo 4 | // 5 | // Created by Alexcai on 2018/10/4. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day34-Gif/GifDemo/GifDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day34-Gif/GifDemo/GifDemo/GifDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day35-CAAnimation/CAAinamationDemo/CAAinamationDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day35-CAAnimation/CAAinamationDemo/CAAinamationDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day35-CAAnimation/CAAinamationDemo/CAAinamationDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CAAinamationDemo 4 | // 5 | // Created by Alexcai on 2018/10/4. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day35-CAAnimation/CAAinamationDemo/CAAinamationDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day35-CAAnimation/CAAinamationDemo/CAAinamationDemo/CAAinamationDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day35-CAAnimation/CAAinamationDemo/CAAinamationDemo/NSBezier+CGPath.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezier+CGPath.swift 3 | // CAAinamationDemo 4 | // 5 | // Created by Alexcai on 2018/10/4. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AppKit 11 | 12 | 13 | extension NSBezierPath { 14 | 15 | internal var cgPath: CGPath { 16 | let path = CGMutablePath() 17 | var points = [CGPoint](repeating: .zero, count: 3) 18 | for i in 0 ..< self.elementCount { 19 | let type = self.element(at: i, associatedPoints: &points) 20 | switch type { 21 | case .moveTo: path.move(to: points[0]) 22 | case .lineTo: path.addLine(to: points[0]) 23 | case .curveTo: path.addCurve(to: points[2], control1: points[0], control2: points[1]) 24 | case .closePath: path.closeSubpath() 25 | } 26 | } 27 | return path 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // DarkModeAdapter 4 | // 5 | // Created by Alexcai on 2018/11/17. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star@3x.png -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star_click@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star_click@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star_click@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/Assets.xcassets/Star.imageset/big_star_click@3x.png -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/DarkModeAdapter.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day36-DarkMode/DarkModeAdapter/DarkModeAdapter/XCMyCustomView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XCMyCustomView.swift 3 | // DarkModeAdapter 4 | // 5 | // Created by Alexcai on 2018/11/18. 6 | // Copyright © 2018 dongjiu. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class XCMyCustomView: NSView { 12 | 13 | override func draw(_ dirtyRect: NSRect) { 14 | super.draw(dirtyRect) 15 | print("changed ...appearance.....") 16 | // Drawing code here. 17 | } 18 | override func updateLayer() { 19 | super.updateLayer() 20 | print("layer changed ...appearance.....") 21 | 22 | } 23 | override func layout() { 24 | super.layout() 25 | print("layout changed ...appearance.....") 26 | } 27 | override func updateConstraints() { 28 | super.updateConstraints() 29 | print("update constraint changed ...appearance.....") 30 | 31 | } 32 | 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alexiuce 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 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :osx, '10.10' 3 | 4 | target 'XCWallpaper' do 5 | # Uncomment this line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for XCWallpaper 9 | pod 'AFNetworking' 10 | pod 'SDWebImage', '~> 4.0.0' 11 | pod 'CocoaSecurity' 12 | pod 'MJExtension' 13 | end 14 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/CocoaSecurity/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Kelp https://github.com/kelp404 3 | 4 | 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: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | 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. 9 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/CocoaSecurity/Base64.h: -------------------------------------------------------------------------------- 1 | ../../../CocoaSecurity/submodules/Base64/Base64/Base64.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/CocoaSecurity/CocoaSecurity.h: -------------------------------------------------------------------------------- 1 | ../../../CocoaSecurity/CocoaSecurity/CocoaSecurity.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJExtension.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/MJExtensionConst.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJExtensionConst.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/MJFoundation.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJFoundation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/MJProperty.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJProperty.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/MJPropertyKey.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJPropertyKey.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/MJPropertyType.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJPropertyType.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/NSObject+MJClass.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJClass.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/NSObject+MJCoding.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJCoding.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/NSObject+MJKeyValue.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJKeyValue.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/NSObject+MJProperty.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJProperty.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/MJExtension/NSString+MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSString+MJExtension.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/NSImage+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/NSImage+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDImageCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDImageCacheConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDImageCacheConfig.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImageManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIView+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/CocoaSecurity/Base64.h: -------------------------------------------------------------------------------- 1 | ../../../CocoaSecurity/submodules/Base64/Base64/Base64.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/CocoaSecurity/CocoaSecurity.h: -------------------------------------------------------------------------------- 1 | ../../../CocoaSecurity/CocoaSecurity/CocoaSecurity.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJExtension.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/MJExtensionConst.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJExtensionConst.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/MJFoundation.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJFoundation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/MJProperty.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJProperty.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/MJPropertyKey.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJPropertyKey.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/MJPropertyType.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/MJPropertyType.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/NSObject+MJClass.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJClass.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/NSObject+MJCoding.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJCoding.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/NSObject+MJKeyValue.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJKeyValue.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/NSObject+MJProperty.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSObject+MJProperty.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/MJExtension/NSString+MJExtension.h: -------------------------------------------------------------------------------- 1 | ../../../MJExtension/MJExtension/NSString+MJExtension.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/NSImage+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/NSImage+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDImageCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDImageCacheConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDImageCacheConfig.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImageManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIView+WebCache.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/MJExtension/MJExtension/MJExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJExtension.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 代码地址:https://github.com/CoderMJLee/MJExtension 8 | // 代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57 9 | 10 | #import "NSObject+MJCoding.h" 11 | #import "NSObject+MJProperty.h" 12 | #import "NSObject+MJClass.h" 13 | #import "NSObject+MJKeyValue.h" 14 | #import "NSString+MJExtension.h" 15 | #import "MJExtensionConst.h" -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/MJExtension/MJExtension/MJExtensionConst.m: -------------------------------------------------------------------------------- 1 | #ifndef __MJExtensionConst__M__ 2 | #define __MJExtensionConst__M__ 3 | 4 | #import 5 | 6 | /** 7 | * 成员变量类型(属性类型) 8 | */ 9 | NSString *const MJPropertyTypeInt = @"i"; 10 | NSString *const MJPropertyTypeShort = @"s"; 11 | NSString *const MJPropertyTypeFloat = @"f"; 12 | NSString *const MJPropertyTypeDouble = @"d"; 13 | NSString *const MJPropertyTypeLong = @"l"; 14 | NSString *const MJPropertyTypeLongLong = @"q"; 15 | NSString *const MJPropertyTypeChar = @"c"; 16 | NSString *const MJPropertyTypeBOOL1 = @"c"; 17 | NSString *const MJPropertyTypeBOOL2 = @"b"; 18 | NSString *const MJPropertyTypePointer = @"*"; 19 | 20 | NSString *const MJPropertyTypeIvar = @"^{objc_ivar=}"; 21 | NSString *const MJPropertyTypeMethod = @"^{objc_method=}"; 22 | NSString *const MJPropertyTypeBlock = @"@?"; 23 | NSString *const MJPropertyTypeClass = @"#"; 24 | NSString *const MJPropertyTypeSEL = @":"; 25 | NSString *const MJPropertyTypeId = @"@"; 26 | 27 | #endif -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/MJExtension/MJExtension/MJFoundation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJFoundation.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 14/7/16. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MJFoundation : NSObject 12 | + (BOOL)isClassFromFoundation:(Class)c; 13 | @end 14 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/MJExtension/MJExtension/MJPropertyKey.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJPropertyKey.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/8/11. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | MJPropertyKeyTypeDictionary = 0, // 字典的key 13 | MJPropertyKeyTypeArray // 数组的key 14 | } MJPropertyKeyType; 15 | 16 | /** 17 | * 属性的key 18 | */ 19 | @interface MJPropertyKey : NSObject 20 | /** key的名字 */ 21 | @property (copy, nonatomic) NSString *name; 22 | /** key的种类,可能是@"10",可能是@"age" */ 23 | @property (assign, nonatomic) MJPropertyKeyType type; 24 | 25 | /** 26 | * 根据当前的key,也就是name,从object(字典或者数组)中取值 27 | */ 28 | - (id)valueInObject:(id)object; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/MJExtension/MJExtension/MJPropertyKey.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJPropertyKey.m 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/8/11. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJPropertyKey.h" 10 | 11 | @implementation MJPropertyKey 12 | 13 | - (id)valueInObject:(id)object 14 | { 15 | if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) { 16 | return object[self.name]; 17 | } else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) { 18 | NSArray *array = object; 19 | NSUInteger index = self.name.intValue; 20 | if (index < array.count) return array[index]; 21 | return nil; 22 | } 23 | return nil; 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/MJExtension/MJExtension/MJPropertyType.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJPropertyType.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 包装一种类型 8 | 9 | #import 10 | 11 | /** 12 | * 包装一种类型 13 | */ 14 | @interface MJPropertyType : NSObject 15 | /** 类型标识符 */ 16 | @property (nonatomic, copy) NSString *code; 17 | 18 | /** 是否为id类型 */ 19 | @property (nonatomic, readonly, getter=isIdType) BOOL idType; 20 | 21 | /** 是否为基本数字类型:int、float等 */ 22 | @property (nonatomic, readonly, getter=isNumberType) BOOL numberType; 23 | 24 | /** 是否为BOOL类型 */ 25 | @property (nonatomic, readonly, getter=isBoolType) BOOL boolType; 26 | 27 | /** 对象类型(如果是基本数据类型,此值为nil) */ 28 | @property (nonatomic, readonly) Class typeClass; 29 | 30 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */ 31 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation; 32 | /** 类型是否不支持KVC */ 33 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled; 34 | 35 | /** 36 | * 获得缓存的类型对象 37 | */ 38 | + (instancetype)cachedTypeWithCode:(NSString *)code; 39 | @end -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Fabrice Aneche 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import 11 | #import "SDWebImageCompat.h" 12 | 13 | typedef NS_ENUM(NSInteger, SDImageFormat) { 14 | SDImageFormatUndefined = -1, 15 | SDImageFormatJPEG = 0, 16 | SDImageFormatPNG, 17 | SDImageFormatGIF, 18 | SDImageFormatTIFF, 19 | SDImageFormatWebP 20 | }; 21 | 22 | @interface NSData (ImageContentType) 23 | 24 | /** 25 | * Return image format 26 | * 27 | * @param data the input image data 28 | * 29 | * @return the image format as `SDImageFormat` (enum) 30 | */ 31 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/NSImage+WebCache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if SD_MAC 12 | 13 | #import 14 | 15 | @interface NSImage (WebCache) 16 | 17 | - (CGImageRef)CGImage; 18 | - (NSArray *)images; 19 | - (BOOL)isGIF; 20 | 21 | @end 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/NSImage+WebCache.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "NSImage+WebCache.h" 10 | 11 | #if SD_MAC 12 | 13 | @implementation NSImage (WebCache) 14 | 15 | - (CGImageRef)CGImage { 16 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height); 17 | CGImageRef cgImage = [self CGImageForProposedRect:&imageRect context:NULL hints:nil]; 18 | return cgImage; 19 | } 20 | 21 | - (NSArray *)images { 22 | return nil; 23 | } 24 | 25 | - (BOOL)isGIF { 26 | return NO; 27 | } 28 | 29 | @end 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/SDImageCacheConfig.m: -------------------------------------------------------------------------------- 1 | // 2 | // SDImageCacheConfig.m 3 | // SDWebImage 4 | // 5 | // Created by Bogdan on 09/09/16. 6 | // Copyright © 2016 Dailymotion. All rights reserved. 7 | // 8 | 9 | #import "SDImageCacheConfig.h" 10 | 11 | static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week 12 | 13 | @implementation SDImageCacheConfig 14 | 15 | - (instancetype)init { 16 | if (self = [super init]) { 17 | _shouldDecompressImages = YES; 18 | _shouldDisableiCloud = YES; 19 | _shouldCacheImagesInMemory = YES; 20 | _maxCacheAge = kDefaultCacheMaxCacheAge; 21 | _maxCacheSize = 0; 22 | } 23 | return self; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) james 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import 11 | #import "SDWebImageCompat.h" 12 | 13 | @interface UIImage (ForceDecode) 14 | 15 | + (nullable UIImage *)decodedImageWithImage:(nullable UIImage *)image; 16 | 17 | + (nullable UIImage *)decodedAndScaledDownImageWithImage:(nullable UIImage *)image; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | 11 | @protocol SDWebImageOperation 12 | 13 | - (void)cancel; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Laurin Brandner 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import "SDWebImageCompat.h" 11 | 12 | @interface UIImage (GIF) 13 | 14 | /** 15 | * Compatibility method - creates an animated UIImage from an NSData, it will only contain the 1st frame image 16 | */ 17 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data; 18 | 19 | /** 20 | * Checks if an UIImage instance is a GIF. Will use the `images` array 21 | */ 22 | - (BOOL)isGIF; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | #import "NSData+ImageContentType.h" 11 | 12 | @interface UIImage (MultiFormat) 13 | 14 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data; 15 | - (nullable NSData *)sd_imageData; 16 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/CocoaSecurity" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = -framework "CoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/CocoaSecurity/CocoaSecurity-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CocoaSecurity : NSObject 3 | @end 4 | @implementation PodsDummy_CocoaSecurity 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/CocoaSecurity/CocoaSecurity-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/CocoaSecurity/CocoaSecurity.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CocoaSecurity 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CocoaSecurity" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/CocoaSecurity" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/MJExtension/MJExtension-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MJExtension : NSObject 3 | @end 4 | @implementation PodsDummy_MJExtension 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/MJExtension/MJExtension-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/MJExtension/MJExtension.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MJExtension 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJExtension" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/CocoaSecurity" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/Pods-XCWallpaper/Pods-XCWallpaper-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XCWallpaper : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XCWallpaper 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SDWebImage : NSObject 3 | @end 4 | @implementation PodsDummy_SDWebImage 5 | @end 6 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SDWebImage 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/CocoaSecurity" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = -framework "ImageIO" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/README.md: -------------------------------------------------------------------------------- 1 | # XCWallpaper 2 | ![](https://img.shields.io/badge/language-Objc-orange.svg) 3 | ![](https://img.shields.io/badge/platform-macOS-lightgrey.svg) 4 | 5 | set wallpaper for Mac OSX 6 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/XCWallpaper.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/XCWallpaper.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day37-CustomCollectionViewLayout/XCWallpaper.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/README.md: -------------------------------------------------------------------------------- 1 | # Day38 2 | ![](https://img.shields.io/badge/language-Swift-orange.svg) 3 | ![](https://img.shields.io/badge/platform-macOS-lightgrey.svg) 4 | 5 | NSResponder Chain 6 | [Mac开发跬步积累(六): 响应链NSResponder Chain](https://www.jianshu.com/p/039cfe2e5ef7) 7 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ResponderChainDemo 4 | // 5 | // Created by Alexcai on 2019/3/25. 6 | // Copyright © 2019 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ResponderChainDemo 4 | // 5 | // Created by Alexcai on 2019/3/25. 6 | // Copyright © 2019 dongjiu. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 18 | // Insert code here to initialize your application 19 | } 20 | 21 | 22 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 23 | // Insert code here to tear down your application 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/ResponderChainDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ResponderChainDemo 4 | // 5 | // Created by Alexcai on 2019/3/25. 6 | // Copyright © 2019 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : NSViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/XCResponseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // XCResponseView.h 3 | // ResponderChainDemo 4 | // 5 | // Created by Alexcai on 2019/3/26. 6 | // Copyright © 2019 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface XCResponseView : NSView 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/XCResponseView.m: -------------------------------------------------------------------------------- 1 | // 2 | // XCResponseView.m 3 | // ResponderChainDemo 4 | // 5 | // Created by Alexcai on 2019/3/26. 6 | // Copyright © 2019 dongjiu. All rights reserved. 7 | // 8 | 9 | #import "XCResponseView.h" 10 | 11 | @implementation XCResponseView 12 | 13 | //- (void)mouseDown:(NSEvent *)event{ 14 | // NSLog(@"%s",__FUNCTION__); 15 | //} 16 | //- (BOOL)acceptsFirstResponder{ 17 | // return YES; 18 | //} 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /macOS-dev/Day38- NSResponderChain/ResponderChainDemo/ResponderChainDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ResponderChainDemo 4 | // 5 | // Created by Alexcai on 2019/3/25. 6 | // Copyright © 2019 dongjiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /macOS-dev/Day4- NSView/NSView.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day4- NSView/NSView.key -------------------------------------------------------------------------------- /macOS-dev/Day4- NSView/NSViewDemo/NSViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day4- NSView/NSViewDemo/NSViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day4- NSView/NSViewDemo/NSViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/13. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day4- NSView/NSViewDemo/NSViewDemo/ColorView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColorView.swift 3 | // NSViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/13. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ColorView: NSView { 12 | 13 | override func draw(_ dirtyRect: NSRect) { 14 | super.draw(dirtyRect) 15 | 16 | // 设置颜色填充 17 | NSColor.orange.set() 18 | 19 | NSBezierPath.fill(dirtyRect) 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSButtonDemo 4 | // 5 | // Created by Alexcai on 2017/8/14. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/tab-noti-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tab-noti-active@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/tab-noti-active.imageset/tab-noti-active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/tab-noti-active.imageset/tab-noti-active@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/tab-noti.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tab-noti@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/tab-noti.imageset/tab-noti@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day5- NSButton/NSButtonDemo/NSButtonDemo/Assets.xcassets/tab-noti.imageset/tab-noti@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/tab-noti-active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day5- NSButton/tab-noti-active@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day5- NSButton/tab-noti@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day5- NSButton/tab-noti@2x.png -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSImageViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/15. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/Assets.xcassets/apple.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "apple.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/Assets.xcassets/apple.imageset/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/Assets.xcassets/apple.imageset/apple.png -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/ClickImageView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClickImageView.swift 3 | // NSImageViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/15. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ClickImageView: NSImageView { 12 | 13 | override func draw(_ dirtyRect: NSRect) { 14 | super.draw(dirtyRect) 15 | 16 | // Drawing code here. 17 | } 18 | 19 | override func mouseDown(with event: NSEvent) { 20 | if self.action == nil, self.target == nil {return} 21 | 22 | NSApp.sendAction(self.action!, to: self.target!, from: self) 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/timg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day6- NSImageView/NSImageViewDemo/NSImageViewDemo/timg.gif -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day6- NSImageView/apple.png -------------------------------------------------------------------------------- /macOS-dev/Day6- NSImageView/timg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day6- NSImageView/timg.gif -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSCollectionViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/16. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet0.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet0.imageset/templet0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet0.imageset/templet0.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet1.imageset/templet1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet1.imageset/templet1.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet10.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet10.imageset/templet10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet10.imageset/templet10.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet2.imageset/templet2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet2.imageset/templet2.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet3.imageset/templet3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet3.imageset/templet3.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet4.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet4.imageset/templet4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet4.imageset/templet4.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet5.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet5.imageset/templet5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet5.imageset/templet5.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet6.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet6.imageset/templet6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet6.imageset/templet6.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet7.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet7.imageset/templet7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet7.imageset/templet7.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet8.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet8.imageset/templet8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet8.imageset/templet8.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "templet9.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet9.imageset/templet9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/Assets.xcassets/templet9.imageset/templet9.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/HeaderView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HeaderView.swift 3 | // NSCollectionViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/16. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class HeaderView: NSView { 12 | 13 | 14 | 15 | @IBOutlet weak var nameLabel: NSTextField! 16 | 17 | override func draw(_ dirtyRect: NSRect) { 18 | super.draw(dirtyRect) 19 | 20 | // Drawing code here. 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/NSCollectionViewDemo/NSCollectionViewDemo/NumberItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NumberItem.swift 3 | // NSCollectionViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/16. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class NumberItem: NSCollectionViewItem { 12 | 13 | // 图片 14 | @IBOutlet weak var picture: NSImageView! 15 | // 文字 16 | 17 | @IBOutlet weak var titleLabel: NSTextField! 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | // Do view setup here. 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet0.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet1.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet10.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet2.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet3.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet4.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet5.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet6.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet7.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet8.png -------------------------------------------------------------------------------- /macOS-dev/Day7- NSCollectionView/templetImage/templet9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day7- NSCollectionView/templetImage/templet9.png -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/DataSouce&Delegate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/DataSouce&Delegate.png -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/.DS_Store -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSTableViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/17. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon0.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon0.imageset/headIcon0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon0.imageset/headIcon0.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon1.imageset/headIcon1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon1.imageset/headIcon1.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon10.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon10.imageset/headIcon10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon10.imageset/headIcon10.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon11.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon11.imageset/headIcon11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon11.imageset/headIcon11.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon12.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon12.imageset/headIcon12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon12.imageset/headIcon12.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon2.imageset/headIcon2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon2.imageset/headIcon2.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon3.imageset/headIcon3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon3.imageset/headIcon3.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon4.imageset/headIcon4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon4.imageset/headIcon4.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon5.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon5.imageset/headIcon5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon5.imageset/headIcon5.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon6.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon6.imageset/headIcon6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon6.imageset/headIcon6.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon7.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon7.imageset/headIcon7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon7.imageset/headIcon7.png -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon8.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon8.imageset/headIcon8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon8.imageset/headIcon8.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "headIcon9.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon9.imageset/headIcon9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/Assets.xcassets/headIcon9.imageset/headIcon9.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/NSTableViewDemo/NSTableViewDemo/MYCellView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MYCellView.swift 3 | // NSTableViewDemo 4 | // 5 | // Created by Alexcai on 2017/8/17. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class MYCellView: NSView { 12 | 13 | @IBOutlet weak var pictureView: NSImageView! 14 | 15 | @IBOutlet weak var nameLabel: NSTextField! 16 | 17 | override func draw(_ dirtyRect: NSRect) { 18 | super.draw(dirtyRect) 19 | 20 | // Drawing code here. 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/TableView section.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/TableView section.png -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon0.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon1.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon10.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon11.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon12.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon2.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon3.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon4.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon5.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon6.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon7.png -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon8.jpg -------------------------------------------------------------------------------- /macOS-dev/Day8- NSTableView/headIcion/headIcon9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alexiuce/macOS-dev-basic-/da8d9219a29f53f98aa1a1726a5184d5bbde5d30/macOS-dev/Day8- NSTableView/headIcion/headIcon9.jpg -------------------------------------------------------------------------------- /macOS-dev/Day9- NSWindow/NSWindowDemo/NSWindowDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Day9- NSWindow/NSWindowDemo/NSWindowDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // NSWindowDemo 4 | // 5 | // Created by Alexcai on 2017/8/18. 6 | // Copyright © 2017年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/AddController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AddController.swift 3 | // Demo 4 | // 5 | // Created by Alexcai on 2017/10/6. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class AddController: NSViewController { 12 | 13 | 14 | @IBOutlet weak var matchTextField: NSTextField! // 赛事 15 | @IBOutlet weak var recordTextField: NSTextField! // 记录 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // Do view setup here. 20 | } 21 | // 点击OK按钮 22 | @IBAction func clickFinished(_ sender: NSButton) { 23 | // 1. 校验赛事和记录逻辑...根据你的实际情景来处理 24 | 25 | // 2. 获取输入数据,封装为模型对象 26 | let match = matchTextField.stringValue 27 | let record = recordTextField.stringValue 28 | let score = ScoreModel(match, record: record) 29 | 30 | // 3. 使用通知方式传递数据 31 | NotificationCenter.default.post(name: Notification.Name("AddNewScore"), object: score) 32 | 33 | // 4.关闭窗口 34 | view.window?.close() 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Demo 4 | // 5 | // Created by Daredake on 2017/10/5. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2017年 Daredake. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/Name.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Name.swift 3 | // Demo 4 | // 5 | // Created by Daredake on 2017/10/6. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class Name: NSObject { 12 | var name: String 13 | 14 | init(name: String) { 15 | self.name = name 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/Phelps.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Phelps.swift 3 | // Demo 4 | // 5 | // Created by Daredake on 2017/10/6. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class Phelps: NSObject { 12 | var matchP: String 13 | var recordP: String 14 | 15 | init(matchP: String, recordP: String) { 16 | self.matchP = matchP 17 | self.recordP = recordP 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/ScoreModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScoreModel.swift 3 | // Demo 4 | // 5 | // Created by Alexcai on 2017/10/6. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ScoreModel: NSObject { 12 | var matchP = "" // 参与赛事 13 | var recordP = "" // 成绩记录 14 | 15 | init(_ match : String , record : String) { 16 | matchP = match 17 | recordP = record 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/SportModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SportModel.swift 3 | // Demo 4 | // 5 | // Created by Alexcai on 2017/10/6. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class SportModel: NSObject { 12 | 13 | var nameP = "" // 运动员姓名 14 | 15 | var scores: [ScoreModel] = [] // 成绩 16 | 17 | init(_ name : String, match: String, recode : String) { 18 | nameP = name 19 | scores = [ScoreModel(match, record:recode)] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /macOS-dev/Q&A/Demo/Demo/SunYang.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SunYang.swift 3 | // Demo 4 | // 5 | // Created by Daredake on 2017/10/6. 6 | // Copyright © 2017年 Daredake. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class SunYang: NSObject { 12 | var matchS: String 13 | var recordS: String 14 | 15 | init(matchS: String, recordS: String) { 16 | self.matchS = matchS 17 | self.recordS = recordS 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Cocoa&OpenGL 4 | // 5 | // Created by Alexcai on 2018/5/6. 6 | // Copyright © 2018年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL/Cocoa_OpenGL.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL/OpenGLReadMe.md: -------------------------------------------------------------------------------- 1 | # <#Title#> 2 | 3 | -------------------------------------------------------------------------------- /macOS-dev/Q&A01- OpenGL/Cocoa&OpenGL/Cocoa&OpenGL/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Cocoa&OpenGL 4 | // 5 | // Created by Alexcai on 2018/5/6. 6 | // Copyright © 2018年 Alexcai. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | } 17 | 18 | 19 | } 20 | 21 | --------------------------------------------------------------------------------