1
1

More than 1 year has passed since last update.

【SwiftUI】Textを全て大文字で表示する

Posted at

はじめに

Textを全て大文字で表記したい時、以下のようなやり方をしてませんか?
私はしてました。

Text("APPLE")
Text("Apple".uppercased())

専用のModifierがあったので記事にしておきます。

やりかた

全て小文字

Text("Apple")
    .textCase(.lowercase)

全て大文字

Text("Apple")
    .textCase(.uppercase)

おわり

結構SwiftUI使ってると思いますが、意外と知らない機能も多いなと感じました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1