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

SOLVED: quick question

Forums > 100 Days of SwiftUI

what does this task on day 42 mean? also im sorry if im cluttering this forum with my questions, recently ive been posting them daily. i could stop and try to figure out myself most of them if these posts bother people. heres the task:

Extract one or two pieces of view code into their own new SwiftUI views – the horizontal scroll view in MissionView is a great candidate, but if you followed my styling then you could also move the Rectangle dividers out too.

aslo on the third challenge: how do i make it so that the list background is bluish and not just black? thanks.

2      

@naNometer wonders about the assignment:

what does this task on day 42 mean? ... snip ... Extract one or two pieces of view code into their own new SwiftUI views

So far you are used to seeing all the application's code in one giant solution file. But SwiftUI structs are lightweight and are often built, destroyed, then rebuilt hundreds of times as you scroll throught your application.

In fact, SwiftUI knows which views, or subviews need to be redrawn and will coordinate updates to just those views. SwiftUI doesn't recalculate the entire view each and every time.

WIth that being said, Paul is challenging you to break your solution view into smaller views. Think of a solution view as being made of several smaller lego blocks. Can you find a subview in your solution? Can you extract that code out into its own SwiftUI file, name it, and pass in a simple parameter or two?

Then use your Lego bricks to create the original solution you started with.

See -> Day 42 Hints

2      

@nanOmeter:

Can you help those of us who want to help new programmers?

Please don't title your post with unhelpful phrases.

"Please help...."
"Quick question!"
"Program CRASHES!"

A month or two from now, another learner may seek help with Day 42 clarification. They will probably not even bother to look at a post named, "Quick Question". How would they know this has anything to do with the Day 42 challenge?

Please consider changing the title of your post. Suggestion:

Day 42 Challenge: What's the goal?

Also, many of us can just give away answers. We've taken the course, struggled with the concepts, worked hard to solve a solution. But what do you want to accomplish?

When you ask for a solution instead of sharing your code, I think you're not trying.

also on the third challenge: how do i make the list background bluish and not just black?

Please paste some code (not your entire application!) showing what view modifiers you tried using to turn the list background bluish. If you provide some code, even bad, unworking code, we can review where you may have missed an important lesson. Then guide you back on track!

4      

Thank you very much @Obelix, both for the answer and the tip. I will try to make usefull titles to help future learners. Have a good day.

2      

@awassjay i ddont speak spanish, do you have a translation? also what is it about?

2      

It's spam. Please dont feed the trolls.

2      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.