I try to create simple calculator app for study purpose but when I try to preview the result it’s zoomed and not in correct size.
this is my sample code:
struct CalculatorView: View {
var buttonTypes: [[ButtonType]] {
[[.allClear, .negative, .percent, .operation(.division)],
[.digit(.seven), .digit(.eight), .digit(.nine), .operation(.multiplication)],
[.digit(.four), .digit(.five), .digit(.six), .operation(.subtraction)],
[.digit(.one), .digit(.two), .digit(.three), .operation(.addition)],
[.digit(.zero), .decimal, .equals]]
}
var body: some View {
VStack {
Spacer()
displayText
buttonPad
}
.padding(Constants.padding)
.background(Color.black)
}
}
I try to put the View in Frame with Width and Height but don’t work. I expect that the app is look correct in full screen on every devices