Post

Replies

Boosts

Views

Activity

Reply to When has the AVSpeechSynthesizer finished reading?
I do not understand what you are trying to do with your stillSpeaking. Generally, looping like while goingon ... does not make sense in GUI code. When you want to detect the AVSpeechSynthesizer finished reading, you implement speechSynthesizer(_:didFinish:) of AVSpeechSynthesizerDelegate. Please show all the relevant code, if you cannot make it by yourself.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to Swift functions
Your function xos(item:count:) takes Int for item:. Your function call xos(item: xo, count: 1) is passing an Array (not Int) to item:. What sort of function do you want to write? A function taking Int and Int? Or a function taking Array and Int?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Is there a way of reloading a View Controller upon completion of a function?
Are there any functions which can be used to refresh it instead? What do you expect to happen with refresh? You may need to implement refresh() by yourself. Essentially all of the labels on my View Controller are assigned a database value, and when one of them are updated I need the View Controller to automatically update to reflect this new order of values.  You have some code somewhere to assign a database value to the labels, move them to refresh() and call it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’21
Reply to Swift functions
i want to write this, Do you just want to write? No need to create an Array? so string and int What will be the values of the String and Int for the example output: [X, 0, 0, 0, 0] [0, X, 0, 0, 0] [0, 0, X, 0, 0] [0, 0, 0, X, 0]  The String value would be "X"? The Int value might be 4 (number of rows)? Or 5 (number of items in a row)? Or 0 (the value for non-X elements)? Or 20 (total number of items)? Or something else?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Swift functions
i want to make a function with array  So, you want to define a function taking Array and Int. OK? And you have not answered to my other questions. Do you just want to write? No need to create an Array? What will be the values of the Array and Int for the example output: Please clarify all the things needed to write a function.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Swift functions
10 and x Int and String (or String and String)? You once said: i want to make a function with array  Please clarify: All the parameters, with the types of them and how they affect the result Result type, Array of String? Or Array of Array of String (often used as a 2-D array)? Or something else?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21