Dominik Hofer
Dominik Hofer

Day 67 #100DaysOfSwiftUI

βœ… Added some additional features on my own

Explored some more CIFilter options, there are surprisingly many!

Also learned that you can just disable views by checking if an optional is empty.

Dominik Hofer
Dominik Hofer

Yesterday, instead of completing the next day of #100DaysOfSwiftUI, I did something even more exciting.

I created my own lil app, a minimal Tichu counter πŸƒ

Pretty simple right now but if anyone wants to try it out, let me know :)

Dominik Hofer
Dominik Hofer

Uno #008

School has started and you're looking for a suitable notetaking app for students?

@rem_note is all you'll ever wish for: Easy to use interface based on nested bullet points and even better: The ability to easily create flashcards right from your notes to practice.

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 66 #100DaysOfSwiftUI

βœ… Built the Instafilter project (part II)

Two things that bug me right now is that the gray background can be bigger than the image itself and that there is no success message (maybe these are going to be tomorrow's challenges πŸ€”).

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

Day 61 #100DaysOfSwiftUI

βœ… Added CoreData to the personal CRM app

Took me two days to implement the CoreData functionality, but it was so worth it – I learned a ton!

Here are the most noteworthy things πŸ‘‡

Show thread (5 posts)
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

Follow

RSS Feeds