Post

Replies

Boosts

Views

Activity

Reply to ForEach and HStack
The getValue function returns two different types in the two classes, Thanks for showing your code. And your code revealed that if you define a combined entity, your code all things would be solved.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Cannot use instance member 'restaurantOptions' within property initializer; property initializers run before 'self' is available
 In my previous code, optionString was supposed to be restaurantString. Then this line (44): optionString = optionString + currentOption + "\n" should be: optionString = optionString + "\n" + currentOption NO? Does that change how I should approach this in any way or not? Yes, it changes the best way you go.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Adding png to ImageView causes black screen
My Main.storyboard has a png background that works. When I change it to instead use the desired Launch Screen.png it also works, proving that the Launch Screen.png is good to use. Can you clarify how many images do you use? a png background in Main.storyboard, Launch Screen.png and IMG_1486.png? Without precise description of what you have done, readers cannot find what's wrong.
Mar ’21
Reply to Graphical Issue
I don't believe there is anything wrong with the code but Xcode. I do believe there is something wrong with your code. Why have you changed line 23 and 24 from the original code? x: width * segment.line.x + xOffset, y: height * segment.line.y If you want to modify some points, all other points needs to be modified consistently. Only modifying this part is making your shape broken.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21