2021 EssentialsSwiftUI & UI Frameworks
WWDC21 · 22 min · Essentials / SwiftUI & UI Frameworks
What’s new in AppKit
Explore the latest advancements in Mac app development with AppKit. We’ll show how you can enhance your app’s design with new control features and SF Symbols 3, build powerful text experiences using TextKit 2, and harness the latest Swift features in your app.
Watch at developer.apple.com ↗Code shown on screen · 2 snippets
Determining a button's background style
class NSButtonCell {
/*
Use to adjust your drawing for the underlying state of the bezel
Returns .normal for colorless states
Returns .emphasized for colorful/emphasis states
*/
var interiorBackgroundStyle: NSBackgroundStyle
} Pick a color
@IBAction func pickColor(_ sender: Any?) {
Task {
guard let color = await NSColorSampler().sample() else { return }
textField.textColor = color
}
} Resources
Related sessions
-
41 min -
34 min -
29 min -
11 min