与这个问题相关。
我正在尝试制作一个基于“备忘录”应用的应用程序。
我将我的iPhone文本大小设置为最小,在视图更改时,新视图工具栏上的文本变得更大。
代码:
.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")
}
}
}
这是个bug吗?