Post

Replies

Boosts

Views

Activity

SwiftUI toolbar text size changes on appear
Stackoverflow links: 1, 2 The screen record is on the first stackoverflow link. I am trying to make an app based on Notes app. I set my iPhone text size to the smallest, and when the view changes, the texts on new view's toolbar gets bigger. Code : toolbar { ToolbarItem(placement: .navigationBarTrailing) { HStack { Button { parentList.starred.toggle() } label: { Label("Toggle Favorite", systemImage: parentList.starred ? "star.fill" : "star") .labelStyle(.iconOnly) .foregroundColor(parentList.starred ? .yellow : .gray) } Button(action: editList) { Label("Edit List", systemImage: "ellipsis.circle") } EditButton() } } ToolbarItem(placement: .bottomBar) { Spacer() } ToolbarItem(placement: .status) { if parentList.childvocabularies!.count == nil { Text("") .foregroundColor(.secondary) .font(.caption) } else if parentList.childvocabularies!.count == 1{ Text("\(parentList.childvocabularies!.count) Vocabulary") .foregroundColor(.secondary) .font(.caption) } else { Text("\(parentList.childvocabularies!.count) Vocabularies") .foregroundColor(.secondary) .font(.caption) } } ToolbarItem(placement: .bottomBar) { Button(action: addItem) { Label("Add Item", systemImage: "plus") } } } Is this a bug?
1
0
1.4k
Apr ’22