Post

Replies

Boosts

Views

Activity

Reply to How to save return value from function in swift ui and use it
Okay typical me hours for hours no answer to the problem and when I am asking, I find it right away... My solution: func returnDirString () -> String {     let dir = "/some/return/string"     return dir } func usingDirString (strUpper: String) {     print(strUpper) } struct ContentView: View {     @State var processString = ""     var body: some View {         Button(action: {             let someString = returnDirString()             $processString.wrappedValue = someString         }) {             Text("Read Apk")         }         .padding()         Button(action: {             usingDirString (strUpper: processString)         }) {             Text("Sign Apk")         }         .padding()     } } But is there a better one please discuss, I am curious!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’21
Reply to How to save return value from function in swift ui and use it
Okay typical me hours for hours no answer to the problem and when I am asking, I find it right away... My solution: func returnDirString () -> String {     let dir = "/some/return/string"     return dir } func usingDirString (strUpper: String) {     print(strUpper) } struct ContentView: View {     @State var processString = ""     var body: some View {         Button(action: {             let someString = returnDirString()             $processString.wrappedValue = someString         }) {             Text("Read Apk")         }         .padding()         Button(action: {             usingDirString (strUpper: processString)         }) {             Text("Sign Apk")         }         .padding()     } } But is there a better one please discuss, I am curious!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Please tell me why licenceUrl is nil???
In my Project I have a .txt file under textFiles/Licence.txt where the Licences are displayed. At licenceUrl.absoluteString I get the error "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Please tell me why licenceUrl is nil???
I expect to open a text file with the default Texteditor when I click on Help > Button AppSignerGui License. Quote from my Question: "I want to open a text file where all the Licence stuff is written down"
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21