-
What's new in Mac Catalyst
Discover the latest updates to Mac Catalyst and find out how you can make your app feel even more at home on macOS. Learn about a variety of new and enhanced UIKit APIs that let you customize your Mac Catalyst app to take advantage of behaviors unique to macOS.
To get the most out of this session, we recommend a basic familiarity with Mac Catalyst. Check out “Introducing iPad Apps for Mac” from WWDC19 to acquaint yourself. For more on refining your Mac Catalyst app, watch “Optimize the interface of your Mac Catalyst app” from WWDC20.Recursos
- Building and improving your app with Mac Catalyst
- Bring an iPad App to the Mac with Mac Catalyst
- Human Interface Guidelines: Mac Catalyst
- Mac Catalyst
Videos relacionados
WWDC21
- Meet Shortcuts for macOS
- Meet the UIKit button system
- Qualities of a great Mac Catalyst app
- Qualities of great iPad and iPhone apps on Macs with M1
- What's new in UIKit
WWDC20
WWDC19
-
Buscar este video…
-
-
2:26 - Push Button
let button = UIButton(type: .system) -
2:29 - Toggle Button
let button = UIButton(type: .system) button.changesSelectionAsPrimaryAction = true -
2:40 - Pull-down Menu
let button = UIButton(type: .system) button.menu = UIMenu() button.showsMenuAsPrimaryAction = true -
2:48 - Pop-up Button
let button = UIButton(type: .system) button.menu = UIMenu() button.showsMenuAsPrimaryAction = true button.changesSelectionAsPrimaryAction = true -
3:50 - UIToolTipInteraction
let toolTipInteraction = UIToolTipInteraction(defaultToolTip: string) view.addInteraction(tooltipInteraction) -
4:06 - UIControl ToopTip
control.toolTip = "Enable updates" -
4:44 - ToolTips: UILabel
label.showsExpansionTextWhenTruncated = true -
4:52 - Printing APIs
<key>UIApplicationSupportsPrintCommand</key> </true> -
5:44 - Print Support
func printContent(_ sender: Any?) { let printInteractionController = UIPrintInteractionController.shared ... } -
6:01 - Window Subtitle
scene.subtitle = "My subtitle" -
7:34 - Behavioral Style
let button = UIButton(configuration: config) button.preferredBehavioralStyle = .pad -
7:43 - Window Tab Opt-Out
<key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <true/> <key>UIApplicationSupportsTabbedSceneCollection</key> <false/> </dict> -
8:23 - UIPointerShape
UIPointerShape.beam(preferredLength:0 axis: .horizontal) UIPointerShape.beam(preferredLength:0 axis: .vertical) -
8:33 - Hidden Cursor
UIPointerStyle.hidden -
13:25 - Scene subtitles
let subtitle: String = "..." let scene: UIScene = ... scene.subtitle = subtitle -
14:54 - ToolTips
// ToolTip Interaction let imageView: UIImageView = UIImageView(frame: .zero) let interaction = UIToolTipInteraction(defaultToolTip: "...") imageView.addInteraction(interaction) // ToolTips - Label Expansion Text let label: UILabel = UILabel() label.text = "..." label.showsExpansionTextWhenTruncated = true // ToolTips — On UIControls let switchControl = UISwitch() switchControl.toolTip = "..." -
17:49 - Primary button
let submitButton = UIButton(type: .system) submitButton.role = .primary submitButton.setTitle("Submit", for: .normal) -
18:06 - Toggle button with menu
// Toggle button with menu let toggleButton = UIButton(configuration: .filled(), primaryAction: nil) toggleButton.configuration?.title = "Points Multiplier" toggleButton.changesSelectionAsPrimaryAction = true toggleButton.menu = ... // Elsewhere... toggleButton.configuration?.baseBackgroundColor = .systemRed -
19:09 - Plain, destructive button
let resetButton = UIButton(configuration: .plain(), primaryAction: nil) resetButton.configuration?.title = "Reset" resetButton.role = .destructive resetButton.tintColor = .systemRed -
19:36 - Pop-up button
let popup = UIButton(type: .system) popup.changesSelectionAsPrimaryAction = true popup.showsMenuAsPrimaryAction = true popup.menu = ... -
21:01 - iPad behavioral style toggle
let button = UIButton(configuration: .filled(), primaryAction: nil) button.configuration?.image = UIImage(systemName: "leaf") button.preferredBehavioralStyle = .pad button.configuration?.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(pointSize: 60) button.changesSelectionAsPrimaryAction = true button.configurationUpdateHandler = colorUpdateHandler -
24:21 - Printing
override func printContent(_: Any?) { ... } override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { if action == #selector(self.printContent(_:)) { ... } else { return super.canPerformAction(action, withSender: sender) } } override func target(forAction action: Selector, withSender sender: Any?) -> Any? { switch action { case #selector(UIResponder.printContent(_:)): ... default: return super.target(forAction: action, withSender: sender) } }
-