iOS and iPadOS
UIKit interoperability
Use Stance colours and fonts in UIKit, host StanceUI views in view controllers, and wrap UIKit views inside StanceUI screens.
StanceUI is SwiftUI first and works in UIKit apps, so existing screens can adopt Stance step by step.
Colours and fonts
view.backgroundColor = StanceUIKit.color(\.bgCanvas) // follows dark mode and Increase Contrast
label.font = StanceUIKit.font(.heading) // scaled for Dynamic Type
label.adjustsFontForContentSizeCategory = trueHosting StanceUI in UIKit
let controller = StanceUIKit.hostingController { TemplateSettings() }
navigationController?.pushViewController(controller, animated: true)Using UIKit views in StanceUI
Wrap the view with UIViewRepresentable as usual, and read colours through StanceUIKit.color so it follows the theme. StanceDocumentPreview is an example: it hosts the Quick Look controller.
Accessibility
- Controls have at least a 44 by 44 point touch target.
- VoiceOver labels, values and traits are set on every component.
- Layouts reflow at the largest Dynamic Type sizes.
- The showcase app runs Apple’s accessibility audit in light, dark and high contrast as part of its tests.