Post

Replies

Boosts

Views

Activity

Reply to How to solve these TextField and Label problem?
Sorry I changed to HStack textField statement     HStack {Text("Calculated number"); TextField("", value: $calculated, format: .number) }     HStack {Text("Calculate number"); TextField("", value: $calculator, format: .number) }     HStack {Text("Calculate way"); TextField("", value: $calculateway, format: .number)}
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’22
Reply to How to fix the TextField?
Here is the whole code @Claude31 import SwiftUI public var calculated = 0.0 public var calculator = 0.0 public var calculateway = "" struct Panel: View {     var body: some View {         VStack {             Image(systemName: "person")                 .imageScale(.large)                 .foregroundColor(.red)             HStack {Text("Calculated number"); TextField("", value: $calculated, format: .number) }             HStack {Text("Calculate numebr"); TextField("", value: $calculator, format: .number) }             HStack {Text("Calculate way"); TextField("", value: $calculateway, format: .number)}         }     } } public var calresult = 0.0 public func calculate() {     if calculateway == "+" {         calresult = Double(Float(calculated + calculator))     }     else if calculateway == "-" {         calresult = Double(Float(calculated - calculator))     }     else if calculateway == "*" {         calresult = Double(Float(calculated * calculator))     }     else if calculateway == "x" {         calresult = Double(Float(calculated * calculator))     }     else if calculateway == "X" {         calresult = Double(Float(calculated * calculator))     }     else if calculateway == "divided by" {         calresult = Double(Float(calculated / calculator))     } } struct Result: View {     var body: some View {         VStack {             Label("Result:", systemImage: /*@START_MENU_TOKEN@*/"42.circle"/*@END_MENU_TOKEN@*/)                 .labelStyle(.titleOnly)         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’22
Reply to How to fix this TextField to variable error?
I expect Apple will answer this question in Chinese.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to How to solve these TextField and Label problem?
Sorry I changed to HStack textField statement     HStack {Text("Calculated number"); TextField("", value: $calculated, format: .number) }     HStack {Text("Calculate number"); TextField("", value: $calculator, format: .number) }     HStack {Text("Calculate way"); TextField("", value: $calculateway, format: .number)}
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Main bundles are expected to have provisioning profiles in order to be eligible for TestFlight
Maybe it is because your provisioning profile is missing or unavailable to run/use. To fix this problem, I think you should add/fix the provisioning profile. (I am not from Apple)
Replies
Boosts
Views
Activity
Mar ’22
Reply to ios 15.4 not installing
Did you click the install button? Maybe you need to click it then it will install.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to How to fix the TextField?
Here is the whole code @Claude31 import SwiftUI public var calculated = 0.0 public var calculator = 0.0 public var calculateway = "" struct Panel: View {     var body: some View {         VStack {             Image(systemName: "person")                 .imageScale(.large)                 .foregroundColor(.red)             HStack {Text("Calculated number"); TextField("", value: $calculated, format: .number) }             HStack {Text("Calculate numebr"); TextField("", value: $calculator, format: .number) }             HStack {Text("Calculate way"); TextField("", value: $calculateway, format: .number)}         }     } } public var calresult = 0.0 public func calculate() {     if calculateway == "+" {         calresult = Double(Float(calculated + calculator))     }     else if calculateway == "-" {         calresult = Double(Float(calculated - calculator))     }     else if calculateway == "*" {         calresult = Double(Float(calculated * calculator))     }     else if calculateway == "x" {         calresult = Double(Float(calculated * calculator))     }     else if calculateway == "X" {         calresult = Double(Float(calculated * calculator))     }     else if calculateway == "divided by" {         calresult = Double(Float(calculated / calculator))     } } struct Result: View {     var body: some View {         VStack {             Label("Result:", systemImage: /*@START_MENU_TOKEN@*/"42.circle"/*@END_MENU_TOKEN@*/)                 .labelStyle(.titleOnly)         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22