Еще хуже, при просмотре на iPhone 8/8 Plus две кнопки находятся на дальних краях окна.
Как правильно применить интервалы/отступы к кнопкам панели инструментов, чтобы они были одинаковыми для разных Устройства iOS?
Спасибо!
[img]https://i.stack.imgur.com /Jzf11.png[/img]
Код: Выделить всё
// This code spaces the buttons but they change positions depending on the iOS device
ToolbarItem {
HStack {
HStack {
ProfileUploadMediaButton()
}.padding([.trailing], 85)
HStack {
ProfileUsernameButton()
}.padding([.trailing], 84)
HStack {
ProfileLiveButton()
}.padding([.trailing], 6)
HStack {
AccountButton()
}.padding([.trailing], 12)
}
}
})

Код: Выделить всё
// I was thinking code like this but all buttons are bunched together on the right-side of // the screen...
ToolbarItem {
HStack {
ProfileUploadMediaButton()
ProfileUsernameButton()
ProfileLiveButton()
AccountButton()
}
}

Подробнее здесь: https://stackoverflow.com/questions/660 ... lbar-items
Мобильная версия