UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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.

2      

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.

2      

@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

2      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.