3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【SwiftUI】Textの文字同士のスペースを操作する

Posted at

はじめに

Textの使ったことのない機能を発見したので記事にしておきます

実装

import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack(spacing: 10) {
            Text("サンプル")
                .kerning(0)
            
            Text("サンプル")
                .kerning(10)
            
            Text("サンプル")
                .kerning(20)
            
            Text("サンプル")
                .kerning(30)
        }
    }
}

simulator_screenshot_1CF7BB98-41FC-4C46-9A79-350D0B3DBA24.png

おわり

こんなことができたんですね、、、

3
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?