Post

Replies

Boosts

Views

Created

Problem with the use of @StateObject, @Published, ObservableObject and @ObservedObject
Firstly I do apologise for the photos rather than the Code format but I am using an iPad and not a Computer. Secondly, I am an absolute newbie and would be so grateful for some advice on this problem. The first photo is two spliced together of one View which is a Form to input data into variables. The second photo is of another View that I expected the data to be printed but this is not happening. Please can somebody help as I have spent many days researching (which has been beneficial in learning more) but have hit a wall that I don’t seem to be able to get past!
2
0
1.1k
Nov ’22
Passing an array into struct
Firstly I am an absolute newbie! In Playgrounds on an iPad I have managed to convert a .csv data string to an Array that I use to print (in Console) several Cards. Now that I have transferred this code to the “App” part I find it doesn’t work which I do understand why. My question is how do I pass the index of this Array to the struct part in the App? I am thinking of starting simple by passing it into a “List”. Hope this all makes enough sense to point me in the right direction. Thanks in advance 🙏🏻
9
0
1.6k
Oct ’22
Problem with the use of @StateObject, @Published, ObservableObject and @ObservedObject
Firstly I do apologise for the photos rather than the Code format but I am using an iPad and not a Computer. Secondly, I am an absolute newbie and would be so grateful for some advice on this problem. The first photo is two spliced together of one View which is a Form to input data into variables. The second photo is of another View that I expected the data to be printed but this is not happening. Please can somebody help as I have spent many days researching (which has been beneficial in learning more) but have hit a wall that I don’t seem to be able to get past!
Replies
2
Boosts
0
Views
1.1k
Activity
Nov ’22
Passing an array into struct
Firstly I am an absolute newbie! In Playgrounds on an iPad I have managed to convert a .csv data string to an Array that I use to print (in Console) several Cards. Now that I have transferred this code to the “App” part I find it doesn’t work which I do understand why. My question is how do I pass the index of this Array to the struct part in the App? I am thinking of starting simple by passing it into a “List”. Hope this all makes enough sense to point me in the right direction. Thanks in advance 🙏🏻
Replies
9
Boosts
0
Views
1.6k
Activity
Oct ’22