NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

DAY 60: I feel like I've hit a brick wall

Forums > 100 Days of SwiftUI

I knew enough to define the data structures, and I guess I should have refered back to previous projects to remember how NavigationViews work, but I feel like I should already know these basic concepts of views cold.

May I make a suggestion, @twostraws? I wish there were a little movie of how the app is supposed to look/work when finished as part of the assignment. I would feel a lot more grounded.

Sorry for the grumbling instead of technical content.

I have no idea where to START on Day 61. I feel like I'm going to end up watching the video solution and not really learning the material.

   

If you use Ducky to define the data structure. This Video by Stewart Lynch on how to use is Ducky Model Editor for Swift Developers

Then to the design may a list with the names (or you could do something like Moonshot) it is total up to you! and a Navigation to a detail screen.

The main thing on this is to get the JSON from the network.

You can only try then if really get stuck then look at Paul's solution

Good Luck and keep coding.

   

@ha1neux is in familiar territory:

I have no idea where to START on Day 61.
I feel like I'm going to end up watching the video solution and not really learning the material.

Yes, the problems with watching @twoStraws building an app online is that he rarely makes a typo, and his logic is clear and straight forward. This is not normal; I am sure he writes a script on paper, defines and redefines variable names, and adjusts his script a few times during his production runs. I'm sure he makes many revisions to his scripts, and logic flows before the final take. Yet, his videos build up an expectation in new developers that the code flows straight out of your brain and into Xcode.

Elsewhere in these forums, I wrote a small article on eating an elephant.

See -> How to eat an elephant.

While the solution I provided in that link isn't related to Day 61, the advice is still sound.

Don't try to eat this challenge in one bite!

Don't even write a single line of code. When you select "New: File...." from Xcode's menu, one of the options available to you is "Rich Text Format". Essentially you can add a text file to your XCode project.

Why not start there and identify the bite sized parts of your elephant? Write down ALL the parts that you can think of.

  • Read data from two JSON sources.
  • Pull data into an array of Structs.
  • What are the data elements in these structs?
  • Design the structs.
  • Write code to read one json file, then display all the data on screen using a boring list.
  • Create a view struct to just show ONE friend object.
  • Refactor the friend LIST view to use the new friendView struct.

Keep going and going. Keep adding to this list and moving them to the second page when you finish that bite of the elephant.

You might be overwhelmed trying to solve exactly the problem as he stated. Yes, you even asked for a short video to see what the results should look like. Part of this learning exercise is determining the many bite sized parts of this application! I encourage you to NOT watch the solution video. Instead, take this opportunity to learn a bit about architecting solutions. This is a tough, but rewarding part of the journey.

Now, take your first bite of this elephant!

Keep Coding

   

Hacking with Swift is sponsored by Play

SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!

Click to learn more about Play!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.