Dominik Hofer
Dominik Hofer

Day 65 #100DaysOfSwiftUI

✅ Built the Instafilter project (part I)

🔑 takeaways:
👉 You can place optional views in UI

This day was a real blessing compared to yesterday 😂

But it's great to see how fast I can already build UIs by now!

Dominik Hofer
Dominik Hofer

Day 64 #100DaysOfSwiftUI

✅ Final introduction to the Instafilter project

🔑 takeaways:
👉 Use coordinator to create delegates (bridge to SwiftUI), which is pretty complicated
👉 Edit info of target for certain operations
👉 Saving an image also requires UIKit

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 63 #100DaysOfSwiftUI

✅ Further introduction to the Instafilter project

🔑 takeaways:
👉 CoreImage is the image manipulation framework (quite hard to get it to work though)
👉 You have to use UIKit sometimes inside of SwiftUI, which is possible (e.g. the photo picker)

Dominik Hofer
Dominik Hofer

Day 62 #100DaysOfSwiftUI

✅ Overview of the Instafilter project

🔑 takeaways:
👉 .onChange() is the best way to react to state changes
👉 .confirmationDialog() is an alert with multiple buttons

Funny that I've only learned about .onChange() yesterday 🤓

Dominik Hofer
Dominik Hofer

Didn't finish today's challenge for #100DaysOfSwiftUI, was way harder than I thought so far.

Will continue tomorrow ✌️

Dominik Hofer
Dominik Hofer

Day 60 #100DaysOfSwiftUI

✅ Created a personal CRM app

This app was not that hard UI-wise, but quite a challenge to get all the data stuff correctly.

Definitely not perfect, but solid I think :)

Read on for a few behind the scenes 👇

Show thread (6 posts)
Dominik Hofer
Dominik Hofer

Day 59 #100DaysOfSwiftUI

✅ Deep dive into CoreData (part III)

Extended the FilteredListView a bit and made it more versatile.

I especially liked the use of enums to ensure that only valid predicates are entered.

Below is my code, if anyone is interested 🤓

Dominik Hofer
Dominik Hofer

Day 58 #100DaysOfSwiftUI

✅ Deep dive into CoreData (part II)

🔑 takeaways:
👉 Use NSPredicate to filter query
👉 Make FetchRequests in subview (with SQL-like syntax)
👉 CoreData relationships

These were some fun but also complex topics today, was great :)

Dominik Hofer
Dominik Hofer

Day 57 #100DaysOfSwiftUI

✅ Deep dive into CoreData (part I)

🔑 takeaways:
👉 .self refers to the whole object → computes hash value
👉 Create a NSManagedObject subclass to handle optionality in one central place
👉 Check if changes were made to the moc
👉 NSMergePolicy

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 56 #100DaysOfSwiftUI

✅ Added some additional features on my own

This challenge wasn't that hard, but I got to reuse some concepts from previous lessons. Especially working with dates and unwrapping optionals with if let.

Dominik Hofer
Dominik Hofer

Day 55 #100DaysOfSwiftUI

✅ Built the Bookworm project (part II)

🔑 takeaways:
👉 Sort data in FetchRequest with a SortDescriptor
👉 Place ToolbarItems in different locations
👉 You can also use dismiss to go back to the last screen

Dominik Hofer
Dominik Hofer

Uno #007

Are you a student or someone who struggles to focus for a long time? Then you should definitely try a pomodoro timer!

The best app I found for this is @stayinsession by @philipyoungg.

Great design, great UX – really love all the thoughtful details.

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 54 #100DaysOfSwiftUI

✅ Built the Bookworm project (part I)

🔑 takeaways:
👉 Use constant bindings in previews
👉 Must use nil coalescing when displaying data from CoreData

Really like the rating view with the stars, my first proper reusable component!

Dominik Hofer
Dominik Hofer

Day 53 #100DaysOfSwiftUI

✅ Overview of the Bookworm project

🔑 takeaways:
👉 @ Binding for changing values in other views
👉 TextEditor for multiline text fields
👉 Intro to CoreData

I feel like with some CoreData skills, I'll finally be able to create my own real apps 🥳

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 52 #100DaysOfSwiftUI

✅ Added some additional features on my own

Like in the Moonshot project, I mainly got to refactor some of the code.

And I learned how valuable it is to create a “wrapper class”, which is much easier to make conform to the Codable protocol:

Dominik Hofer
Dominik Hofer

Things I ❤️ about building apps for : The lil details that work automagically.

E.g. the stepper component allows you to long-press a button to change the variable faster. After five iterations, the counter increases in speed.

Awesome!

Dominik Hofer
Dominik Hofer

Day 51 #100DaysOfSwiftUI

✅ Built the Cupcake Corner project (part II)

🔑 takeaways:
👉 You can create multiple class initialisers
👉 Codable, URLRequest and URLSession are a powerful combo
👉 Place async function call in button inside Task
👉 ! for force unwrapping

Dominik Hofer
Dominik Hofer

Great quote from todays lesson in #100DaysOfSwiftUI from @twostraws.

This is exactly the kind of design I'll try to implement in my apps.

Dominik Hofer
Dominik Hofer

Day 50 #100DaysOfSwiftUI

✅ Built the Cupcake Corner project (part I)

🔑 takeaways:
👉 Save data like types as static arrays in class
👉 Use indices property to get the indices of array
👉 Toggle view
👉 Put validations in data not view (computed property)

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 49 #100DaysOfSwiftUI

✅ Overview of the CupcakeCorner project

🔑 takeaways:
👉 Codable doesn’t work with @ Published, create custom initializer & encoder
👉 async/await and .task for loading data
👉 AsyncImage for loading images
👉 Validate & disable forms with .disabled()

Dominik Hofer
Dominik Hofer

Day 48 #100DaysOfSwiftUI

✅ Break day

Nearly 50% done with the course and today was the first day I didn't actually write any code. But I've watched two great videos instead.

If you have any spare time today and are (becoming) a coder, watch this video by @stevewoz 👇

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 47 #100DaysOfSwiftUI

✅ Created the simplest habit tracker ever

This was the first app that I completely built by myself that is actually useful. Impressive, I know 😉

Will probably add a few features if I have time the coming days.

Read on for a few behind the scenes 👇

Show thread (7 posts)
Dominik Hofer
Dominik Hofer

Uno #006

Tracking expenses is the best way to gain an overview over your finances. But doing it regularly can be tedious.

The solution – an app like @FiveCentsApp by @degisner. It's simple, beautiful and works like a charm.

Entering expenses is as quick as it can get.

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 46 #100DaysOfSwiftUI

✅ Made my own custom shapes

Doesn't look that beautiful but was a great way to repeat some of the learnings from this section.

Now looking forward to the next bigger challenge tomorrow (already had a look 🤫).

Dominik Hofer
Dominik Hofer

Day 45 #100DaysOfSwiftUI

✅ Animating shapes

🔑 takeaways:
👉 .blendMode()
👉 Animate shape changes with animatableData
👉 For multiple props, use AnimatablePair
👉 Only Doubles can be interpolated (not Ints)

Made something even cooler today than yesterday!

Dominik Hofer
Dominik Hofer

Day 44 #100DaysOfSwiftUI

✅ Drawing more advanced shapes

🔑 takeaways:
👉 Use stride to create a custom range
👉 CGAffineTransform
👉 FillStyle(eoFill: true) for even-odd filling
👉 Image border with ImagePaint()
👉 Enable Metal with .drawingGroup()

Wanna see something cool?

Dominik Hofer
Dominik Hofer

Day 43 #100DaysOfSwiftUI

✅ Drawing simple shapes

🔑 takeaways:
👉 Use Path type to draw shapes
👉 Shapes are built using paths, but more flexible
👉 .strokeBorder() draws on the inside (use InsettableShape protocol)

Here's a struct that draws an arc (great for charts) 👇

Dominik Hofer
Dominik Hofer

Day 41 #100DaysOfSwiftUI

✅ Built the Moonshot project (part II)

🔑 takeaways:
👉 Use struct initializer to “merge” JSON files
👉 .navigationBarTitleDisplayMode(.inline) on subviews
👉 Force unwrap with !

Also added a little indicator about which crew member was the commander.

Dominik Hofer
Dominik Hofer

Day 40 #100DaysOfSwiftUI

✅ Built the Moonshot project (part I)

🔑 takeaways:
👉 Use a separate file to load data into app
👉 Generics are useful for reusability
👉 Use computed properties in your structs
👉 Define colors with an extension
👉 .preferredColorScheme(.dark)

Dominik Hofer
Dominik Hofer

Uno #005

Newsletters cluttering up your inbox?

No problem, just use a dedicated inbox for all the newsletters you don't want to miss. I personally like @stoopinbox. It gives you a special email address and reading app.

What's a newsletter everyone should subscribe to?

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 39 #100DaysOfSwiftUI

✅ Overview of the Moonshot project

🔑 takeaways:
👉 .resizeable() to resize images with .scaledToFit/Fill()
👉 GeometryReader is really powerful for resizing
👉 ScrollView
👉 Lazy stacks/grids for lazy loading
👉 NavigationLink to “connect” views

Dominik Hofer
Dominik Hofer

Day 38 #100DaysOfSwiftUI

✅ Added some additional features on my own

This was a fun project to work on, something I would actually use myself with a few more features 🙌

I especially like the idea with the picker up top to select the entries that should be shown.

Dominik Hofer
Dominik Hofer

Day 37 #100DaysOfSwiftUI

✅ Built the iExpense project

🔑 takeaways:
👉 Organize classes & structs in other files
👉 Use UUID() to create unique ids
👉 Pass data to child views as ObservableObject
👉 Use didSet and initializer to write/read data from class to UserDefaults

Dominik Hofer
Dominik Hofer

Day 36 #100DaysOfSwiftUI

✅ Overview of the iExpense project

🔑 takeaways:
👉 Learned about a few property wrappers: StateObject, ObservedObject, Environment, AppStorage
👉 .sheet() modifier to display overlaying view
👉 .onDelete() with ForEach to delete rows

Dominik Hofer
Dominik Hofer

Day 35 (Part II) #100DaysOfSwiftUI

Finished the game and even managed to add a few animations. I'm especially proud of the card flip 🙌

The code behind it is quite ugly though, will probably come back to it and do a little refactor.

Other suggestions on what I could improve?

Show thread (2 posts)

Follow

RSS Feeds