Question: Dynamic Type Support for SUButton
Hi! I'm using ComponentsKit in my iOS app and trying to ensure that SUButton properly supports Dynamic Type (Accessibility font sizes).
Current Implementation
I'm currently using SUButton like this:
@State private var model = ButtonVM {
$0.title = "Button Title"
}
SUButton(model: self.model)
.accessibilityLabel("Dynamic Type Test Button")
Questions
-
Is SUButton supposed to automatically support Dynamic Type?
- Should it respond to system font size changes without additional configuration?
-
What's the proper way to configure Dynamic Type support for SUButton?
- Are there specific properties in
ButtonVM that need to be set?
- Should I use
.environment(\.sizeCategory, sizeCategory) modifier?
-
Font Configuration:
- What's the difference between
font and textStyle properties in ButtonVM?
- Which one should I use for Dynamic Type support?
-
Testing Dynamic Type:
- How can I verify that SUButton is properly responding to Dynamic Type changes?
- Are there any specific accessibility considerations I should be aware of?
Environment
- ComponentsKit version: 1.5.4
- iOS target: iOS 17+
- SwiftUI
Expected Behavior
I expect SUButton to:
- Automatically scale its text size when the user changes their preferred font size in Settings
- Maintain proper button proportions and layout
- Be accessible to users with different accessibility needs
Current Behavior
I'm not sure if the button is properly responding to Dynamic Type changes, and I'd like to confirm the correct configuration approach.
Additional Context
I'm building a healthcare app where accessibility is crucial, so proper Dynamic Type support is important for our users.
Thank you for your help! ��
Question: Dynamic Type Support for SUButton
Hi! I'm using ComponentsKit in my iOS app and trying to ensure that
SUButtonproperly supports Dynamic Type (Accessibility font sizes).Current Implementation
I'm currently using SUButton like this:
Questions
Is SUButton supposed to automatically support Dynamic Type?
What's the proper way to configure Dynamic Type support for SUButton?
ButtonVMthat need to be set?.environment(\.sizeCategory, sizeCategory)modifier?Font Configuration:
fontandtextStyleproperties inButtonVM?Testing Dynamic Type:
Environment
Expected Behavior
I expect SUButton to:
Current Behavior
I'm not sure if the button is properly responding to Dynamic Type changes, and I'd like to confirm the correct configuration approach.
Additional Context
I'm building a healthcare app where accessibility is crucial, so proper Dynamic Type support is important for our users.
Thank you for your help! ��