Post

Replies

Boosts

Views

Activity

Reply to Camera does not work with Xocde13.3.1
The Simulator does not have a camera! Only real device have cameras. Your code may well be fine. Try running it on a real iPhone or iPad, and see if it works. Note: Your code checks "isSourceTypeAvailable(camera)", but you don't take any action if the sourceType is not available. If you (for example) logged an error message to the console, then you would have noticed that your app was not detecting a camera.
Apr ’22
Reply to TextField Binding
When you say: let textModel = textModels[index] ...you are creating a temporary "textModel", which only lives for 1 pass of your ForEach. So you can't use it as a Binding (because it won't exist, when you try and access it later). (I'm away from Xcode, but) I would omit the line above, and try: TextField("", text: $textModels[index].name)
Apr ’22