codingoutofcuriosity
101 posts
Building apps using Swift and SwiftUI.
Don't wanna be here? Send us removal request.
Text
6-1-24: Day 100
Day 100 consisted of the final exam for the 100 Days of SwiftUI with 100 questions across all parts of the curriculum, from the first project to the last:
Final exam
Final exam:
100/100. Free from tutorial hell, for now.
Day 100 quote: "Success is not the absence of failure; it's the persistence through failure." - Aisha Tyler
#day 100#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
1 note
·
View note
Text
5-31-24: Day 99
Day 99 consisted of the wrap up chapter for project 19, its review, and 3 challenges:
SnowSeeker review
Challenge 1: Add a photo credit over the ResortView image. The data is already loaded from the JSON for this purpose, so you just need to make it look good in the UI:
Challenge 2: Fill in the loading and saving methods for Favorites:
Challenge 3: For a real challenge, let the user sort the resorts in ContentView either using the default order, alphabetical order, or country order:
Day 99 quote: "To be ready to fail is to be prepared for success." - Jose Bergamin
#day 99#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
if you’re interested in day 95, please check out days 60 and 61!
4-16-24: Day 60
Day 60 consisted of another milestone and the fifth consolidation day, reviewing what I learned, key points, and a challenge to build another complete app from scratch by ourselves:
Key Points:
Custom Codable keys
Completely custom Codable implementations
Challenge: Use URLSession to download some JSON from the internet, use Codable to convert it to Swift types, then use NavigationStack, List, and more to display it to the user. Your first step should be to examine the JSON. There is an array of people, and each person has an ID, name, age, email address, and more. They also have an array of tag strings, and an array of friends, where each friend has a name and ID. At the very least you should 1) Fetch the data and parse it into User and Friend structs, 2) Display a list of users with a little information about them, such as their name and whether they are active right now, 3) Create a detail view shown when a user is tapped, presenting more information about them, including the names of their friends, and 4) Before you start your download, check that your User array is empty so that you don’t keep starting the download every time the view is shown:
I never fully grasped how to handle JSON before starting this project, and I learned so much in the past 24 hours, not only that. It taught me a lot. Tomorrow, I'll fix the date format, add the colors and designs I deemed lower priority, and review for Day 59's challenges. I interrogated the hell out of an AI, learned more in a day than I have in the past 5 days, and I'm going to sleep.
Day 60 quote: "I hope that in this year to come, you make mistakes. Because if you are making mistakes, then you are making new things, trying new things, learning, living, pushing yourself, changing yourself, changing your world. You're doing things you've never done before, and more importantly, you're doing something." - Neil Gaiman
#day 60#day 61#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
1 note
·
View note
Text
5-30-24: Day 98
Day 98 consisted of 4 tutorials:
1. Searching for data in a List
2. Changing a view’s layout in response to size classes
3. Binding an alert to an optional string
4. Letting the user mark favorites
Day 98 quote: "It’s only hard until it becomes easy." David A. Smith
#day 98#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-29-24: Day 97
Day 97 consisted of 3 tutorials:
1. Building a primary list of items
2. Presenting a default detail view on iPad
3. Creating a detail view for resorts
Day 97 quote: "I am always doing that which I cannot do, in order that I may learn how to do it." - Pablo Picasso
#day 97#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-28-24: Day 96
Day 96 consisted of 6 tutorials:
1. SnowSeeker: Introduction
2. Working with two side by side views in SwiftUI
3. Using alert() and sheet() with optionals
4. Using groups as transparent layout containers
5. Making a SwiftUI view searchable
6. Sharing @Observable objects through SwiftUI's environment
Day 96 quote: "Because we already shipped over 75 million iPhones, there are already 75 million users who know how to use the iPad." - Steve Jobs
#day 96#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-27-24: Day 95
Day 95 consisted of another milestone and the seventh consolidation day, reviewing what I learned, key points, and a challenge to build another complete app from scratch by ourselves:
Key points:
Functional programming
Result
Challenge: Build an app that helps users roll dice then store the results they had. At the very least you should let users roll dice, and also let them see results from previous rolls:
This is as far as I got. It's a skeleton, but I plan to expand on it much further in the future and make it a portfolio project.
Day 95 quote: "Being challenged in life is inevitable, but being defeated is optional." - Roger Crawford
#day 95#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
18 notes
·
View notes
Text
5-26-24: Day 94
Day 94 consisted of the wrap up chapter for project 18, its review, and 3 challenges:
LayoutAndGeometry review
Challenge 1: Make views near the top of the scroll view fade out to 0 opacity – I would suggest starting at about 200 points from the top:
Challenge 2: Make views adjust their scale depending on their vertical position, with views near the bottom being large and views near the top being small. I would suggest going no smaller than 50% of the regular size:
Challenge 3: For a real challenge make the views change color as you scroll. For the best effect, you should create colors using the Color(hue:saturation:brightness:) initializer, feeding in varying values for the hue:
I’m sure there’s a way I can avoid repeating "Double.random(in: 0…1)", but I didn’t spend too much time on it, and storing the values in a constant wasn’t working for some reason.
Day 94 quote: "The greatest things in life tend to happen outside our comfort zones, and doubting your ability to step outside of your comfort zone will keep you stuck." - Amy Morin
#day 94#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-25-24: Day 93
Day 93 consisted of 4 tutorials:
1. Resizing images to fit the screen using GeometryReader
2. Understanding frames and coordinates inside GeometryReader
3. ScrollView effects using GeometryReader
4. ScrollView effects using visualEffect() and scrollTargetBehavior()
Day 93 quote: "The true method of knowledge is experiment." - William Blake
#day 93#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
1 note
·
View note
Text
5-24-24: Day 92
Day 92 consisted of 5 tutorials:
1. Layout and geometry: Introduction
2. How layout works in SwiftUI
3. Alignment and alignment guides
4. How to create a custom alignment guide
5. Absolute positioning for SwiftUI views
Day 92 quote: "If you really hate someone, teach them to recognize bad kerning." - Randall Munroe
#day 92#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
1 note
·
View note
Text
Needed a break!
5-23-24: Day 91
Day 91 consisted of the wrap up chapter for project 17, its review, and 3 challenges:
Flashzilla review
Challenge 1: When adding a card, the text fields keep their current text. Fix that so that the textfields clear themselves after a card is added:
Challenge 2: If you drag a card to the right but not far enough to remove it, then release, you see it turn red as it slides back to the center. Why does this happen and how can you fix it? (Tip: think about the way we set offset back to 0 immediately, even though the card hasn’t animated yet. You might solve this with a ternary within a ternary, but a custom modifier will be cleaner.):
Simplest solution for now.
Challenge 3: For a harder challenge: when the users gets an answer wrong, add that card back into the array so the user can try it again. Doing this successfully means rethinking the ForEach loop, because relying on simple integers isn’t enough—your cards need to be uniquely identifiable:
I made the cards conform to identifiable but got stuck on fixing the index and looked over a solution.
Day 91 quotes: "Things do not happen—things are made to happen." - John F. Kennedy; "Ideas without action aren't ideas—they're regrets." - Steve Jobs
#day 91#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-16-24: Day 90
Day 90 consisted of 2 tutorials:
1. Fixing the bugs
2. Adding and deleting cards
Day 90 quote: "If debugging is the process of removing bugs, then programming must be the process of putting them in." - Edsger Dijkstra
#day 90#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
1 note
·
View note
Text
5-15-24: Day 89
Day 89 consisted of 3 tutorials:
1. Coloring views as we swipe
2. Counting down with a Timer
3. Ending the app with allowsHitTesting()
Day 89 quote: "Accessibility allows us to tap into everyone’s potential." - Debra Ruh
#day 89#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-14-24: Day 88
Day 88 consisted of 3 tutorials:
1. Designing a single card view
2. Building a stack of cards
3. Moving views with DragGesture and offset()
Day 88 quote: "We’re going to use the best pointing device in the world. We’re going to use a pointing device that we’re all born with—born with ten of them. We’re going to use our fingers. We’re going to touch this with our fingers. And we have invented a new technology called multi-touch, which is phenomenal—it works like magic." - Steve Jobs
#day 88#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-13-24: Day 87
Day 87 consisted of 3 tutorials:
1. Triggering events repeatedly using a timer
2. How to be notified when your SwiftUI app moves to the background
3. Supporting specific accessibility needs with SwiftUI
Day 87 quote: "Code is like humor. When you have to explain it, it’s bad." - Cory House
#day 87#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
0 notes
Text
5-12-24: Days 85, 86
Day 85, Challenge 3:
I had some help from AI on this one, but I have an example to study now!
Day 86 consisted of 3 tutorials:
1. Flashzilla: Introduction
2. How to use gestures in SwiftUI
3. Disabling user interactivity with allowsHitTesting()
Day 86 quote: "When [gesture recognizers are] feeling really good, sometimes people even say it feels natural, or magical." - Chan Karunamuni
#day 85#day 86#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
2 notes
·
View notes
Text
5-11-24: Day 85
Day 85 consisted of the wrap up chapter for project 16, its review, and 3 challenges:
1. HotProspects review
Challenge 1: Add an icon to the “Everyone” screen showing whether a prospect was contacted or not:
Challenge 2: Add an editing screen, so users can adjust the name and email address of someone they scanned previously. (Tip: Use the simple form of NavigationLink rather than navigationDestination(), to avoid your list selection code confusing the navigation link.):
A good amount of trial and error got me to this point.
Challenge 3: All users to customize the way contacted are sorted—by name or by most recent:
I was halfway through with this, but I couldn’t figure it out. I’m sure there’s a simpler way.
Day 85 quote: "If I have seen further it is by standing on the shoulders of giants." - Isaac Newton
#day 85#100 days of swiftui#ios#ios development#software development#software engineering#programming#coding#codeblr
1 note
·
View note