Jared Sinclair 3/2/2024

Scaled Metric Surprises on iOS & iPadOS

Read Original

This technical article details how UIKit's UIFontMetrics.scaledValue(for:) and SwiftUI's @ScaledMetric property wrapper do not scale values proportionally to the default system font sizes for a given text style (e.g., .body). It demonstrates the divergence with code examples and recommends directly using a UIFont's pointSize for exact proportional scaling with dynamic type.

Scaled Metric Surprises on iOS & iPadOS

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes