LoginSignup
0
0

More than 1 year has passed since last update.

【Swift】WidgetExtensionのバグ

Posted at

問題点

全角と半角を連続で入力すると強制的に省略される
Simulator Screen Shot - iPhone 12 mini - 2022-06-20 at 14.03.38.png

struct widget_bugEntryView : View {
    var entry: Provider.Entry
    var body: some View {
        Text("あいう123abc")
    }
}

対策法1

全角と半角の間にスペースを入れる
Simulator Screen Shot - iPhone 12 Pro Max - 2022-06-20 at 13.58.10.png

struct widget_bugEntryView : View {
    var entry: Provider.Entry
    var body: some View {
        Text("あいう 123 abc")
    }
}

対策法2

HStackで横並びにTextを分ける
Simulator Screen Shot - iPhone 12 Pro Max - 2022-06-20 at 13.59.33.png

struct widget_bugEntryView : View {
    var entry: Provider.Entry
    var body: some View {
        HStack(spacing: 0) {
            Text("あいう")
            Text("123")
            Text("abc")
        }
    }
}
0
0
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
0
0