Faking Value Semantics with Custom FormatStyles
Read OriginalThe article discusses the limitations of the old NSFormatter API and introduces Swift's new FormatStyle protocol. It provides a step-by-step tutorial on creating a custom OrdinalFormatStyle for locale-aware ordinal number formatting (e.g., "3rd"), including performance optimizations and handling shared formatter instances.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser