{"id":38388,"date":"2023-02-06T16:50:19","date_gmt":"2023-02-06T21:50:19","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=38388"},"modified":"2025-10-29T09:38:38","modified_gmt":"2025-10-29T13:38:38","slug":"example-custom-formatstyles","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/02\/06\/example-custom-formatstyles\/","title":{"rendered":"Example Custom FormatStyles"},"content":{"rendered":"<p><a href=\"https:\/\/mastodon.social\/@schwa\/109788455216400381\">Jonathan Wight<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@schwa\/109788455216400381\"><p>I&rsquo;ve been making <a href=\"https:\/\/github.com\/schwa\/SwiftFormats\">a package<\/a> of custom Swift <code>(Parseable)FormatStyles<\/code> for types that don&rsquo;t currently get any love by the standard library.<\/p><p>My main need for this is GUI apps showing complex 3D types (think a SwiftUI field editor for a quaternion, etc) -- but am building it by composing basic types and <code>FormatStyles<\/code>.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/16\/parsableformatstyle\/\">ParsableFormatStyle<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/10\/formatstyles-in-ios-16-and-macos-13\/\">FormatStyles in iOS 16 and macOS 13<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/03\/22\/swift-formatstyle-deep-dive\/\">Swift FormatStyle Deep Dive<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/01\/26\/swift-foundation-formatter-improvements\/\">Swift Foundation Formatter Improvements<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Jonathan Wight: I&rsquo;ve been making a package of custom Swift (Parseable)FormatStyles for types that don&rsquo;t currently get any love by the standard library.My main need for this is GUI apps showing complex 3D types (think a SwiftUI field editor for a quaternion, etc) -- but am building it by composing basic types and FormatStyles. Previously: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-02-06T21:50:32Z","apple_news_api_id":"6b2e7ced-1f55-492c-99e9-b7bc9d0fbded","apple_news_api_modified_at":"2025-10-29T13:38:41Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/Aay587R9VSSyZ6be8nQ-97Q","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[31,2185,30,2223,74,71,2854,901],"class_list":["post-38388","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-ios","tag-ios-16","tag-mac","tag-macos-13-ventura","tag-opensource","tag-programming","tag-swift-foundation","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=38388"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38388\/revisions"}],"predecessor-version":[{"id":38389,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38388\/revisions\/38389"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=38388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=38388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=38388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}