-
Modernize seu app do UIKit
Conheça as últimas atualizações do UIKit. Aprenda a atualizar os layouts do seu app para iPhone para que funcionem bem quando forem redimensionados com Espelhamento do iPhone e no iPad. Explore novas APIs para abas e barras de navegação, descubra como preparar seu app para os novos recursos da Apple Intelligence e conheça uma funcionalidade para o seu agente de programação preferido que ajuda a modernizar sua base de código.
Capítulos
- 0:00 - Introdução
- 0:34 - Adaptação de apps
- 2:10 - API Herdada: Ciclo de vida do app
- 2:51 - API Herdada: Tela principal
- 5:46 - Modo Tela Cheia para Jogos
- 6:17 - API legada: Idioma de interface do usuário
- 7:55 - Protocolos Body do UIView para movimento e localização
- 8:19 - Teste o app para iPhone redimensionável
- 9:18 - Barra de abas e barra lateral
- 10:52 - Barras de Navegação
- 12:37 - Menus
- 13:01 - Integre com Apple Intelligence
- 14:07 - Programação agêntica
- 15:32 - Próximas etapas
Recursos
- TN3208: Preparing your app’s launch screen to meet App Store requirements
- TN3210: Optimizing your app for iPhone Mirroring
- Make your UIKit app more flexible
- Adapting your app when traits change
- Transitioning to the UIKit scene-based life cycle
- Automatic trait tracking
- Human Interface Guidelines: Menus
Vídeos relacionados
WWDC26
- Aproveite ao máximo o Device Hub
- Descubra recursos avançados do App Intents para Siri e Apple Intelligence
WWDC25
WWDC24
-
Buscar neste vídeo...
-
-
3:24 - Use local screen references
// Use local screen references // Access the correct screen through a windowScene let screen = window?.windowScene?.screen // Pass in local screen references func generateThumbnail(_ image: UIImage, screen: UIScreen) -> UIImage { // existing code, replacing main screen with local screen reference // ... } -
3:49 - Replace screen scale with displayScale
// Replace the screen's scale with trait collection's displayScale override func layoutSubviews() { super.layoutSubviews() // layoutSubviews will be called again automatically when displayScale changes let displayScale = traitCollection.displayScale // ... } -
4:36 - Register for trait changes
// Manually register for trait changes let displayScaleTrait: [UITrait] = [UITraitDisplayScale.self] registerForTraitChanges(displayScaleTrait) { (view: GalleryView, previousTraitCollection: UITraitCollection) in view.cache.invalidate() } -
5:19 - Monitor effective geometry changes
// UIWindowSceneDelegate func windowScene( _ windowScene: UIWindowScene, didUpdateEffectiveGeometry previousEffectiveGeometry: UIWindowScene.Geometry ) { let geometry = windowScene.effectiveGeometry let availableSpace = geometry.coordinateSpace.bounds // ... } -
5:35 - Check available space using view bounds
// Checking available space override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() let availableSpace = view.bounds.size // ... } -
8:12 - Configure motion and location body
// Configure motion and heading bodies override func viewDidLoad() { super.viewDidLoad() motionManager.deviceMotionBody = view locationManager.headingBody = view } -
9:51 - Opt into sidebar layout
tabBarController.sidebar.preferredPlacement = .sidebar -
10:22 - Check sidebar availability
tabBarController.sidebar.isAvailable -
10:53 - Set prominent tab identifier
// Set the prominent tab let tabs = [ // ... ] let tabBarController = UITabBarController(tabs: tabs) tabBarController.prominentTabIdentifier = "cart" -
11:30 - Customize bar minimization behavior
// Customize bar minimization behavior override init( nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle? ) { super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) navigationItem.barMinimizationBehavior = .always navigationItem.barMinimizationSafeAreaAdjustment = .never } -
15:05 - Export Xcode skills for use in other tools
xcrun agent skills export
-