From 3e2d2d6560911ceb486cbbdd5cc4000d551f6086 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 21 Jul 2018 13:12:27 -0700 Subject: [PATCH] Really update new-in-Cocoa notes. --- Technotes/NewInCocoa2018.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Technotes/NewInCocoa2018.md b/Technotes/NewInCocoa2018.md index bbd850837..1ffbb289d 100644 --- a/Technotes/NewInCocoa2018.md +++ b/Technotes/NewInCocoa2018.md @@ -6,3 +6,37 @@ NSImage(named: string) is now allowed! NSMenuItemValidation is now a real protocol, other informals have been made real Secure coding with NSKeyedArchiver, unarchiver +NSColor.controlAccentColor +.withSystemEffect - pressed, disabled, etc. +Content Tint Color +NSButton, NSImageView contentTintColor + +Layer Backing +Not one to one NSView to CALayer (unlike UIKit) +No need to set .wantsLayer = true +Use NSView draw method instead of layer drawing +Fine to implement updateLayer along with draw method +.wantsUpdateLayer is okay +Don’t use NSView lock/unlock focus + +User Notifications +NSUserNotification deprecated + +NSToolbar +centeredItemIdentifier +Auto layout now used when min max sizes not specified + +NSGridView +Grid views authored in IB work in 10.13 + +NSTextView +fieldEditor +scrollableTextView +etc. +performValidatedReplacement - calls delegates properly, fills in atts from typing atts +May need to call setSelectedRange first to get proper atts +validRequestor - Services API + +Custom Quick Actions + +