/tag

#tweet

Dominik Hofer
Dominik Hofer

Day 72 #100DaysOfSwiftUI

โœ… Built the BucketList project (part III)

๐Ÿ”‘ takeaways:
๐Ÿ‘‰ ViewModel is a software architecture pattern (create view extension)
๐Ÿ‘‰ View should only be responsible for displaying data
๐Ÿ‘‰ Use private(set) in ViewModel
๐Ÿ‘‰ You can encrypt data on save

Dominik Hofer
Dominik Hofer

Uno #009

The one app you probably use the most every day is your browser. Why not give it an upgrade?

The best new browser on the market is, without a doubt, Arc by @browsercompany.

Clean design and many great features you won't find elsewhere ๐Ÿคฉ

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 71 #100DaysOfSwiftUI

โœ… Built the BucketList project (part II)

๐Ÿ”‘ takeaways:
๐Ÿ‘‰ + Text() to combine texts
๐Ÿ‘‰ Outsource as much cleanup work as possible to the data struct
๐Ÿ‘‰ Reminder that nil coalescing is so useful

Dominik Hofer
Dominik Hofer

Day 70 #100DaysOfSwiftUI

โœ… Built the BucketList project (part I)

๐Ÿ”‘ takeaways:
๐Ÿ‘‰ Add example data to types
๐Ÿ‘‰ You can use optional variables to toggle sheets
๐Ÿ‘‰ Set default state values with initializer and _variableName

Really like working with maps so far!

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

Day 69 #100DaysOfSwiftUI

โœ… Further intro to the BucketList project

๐Ÿ”‘ takeaways:
๐Ÿ‘‰ MapKit integrates natively into SwiftUI (and is quite pleasant to use)
๐Ÿ‘‰ You can add FaceID pretty easily as well (needs permission)

Was surprised that this didn't need some UIKit-hacks ๐Ÿ˜ฎโ€๐Ÿ’จ

Dominik Hofer
Dominik Hofer

Day 68 #100DaysOfSwiftUI

โœ… Overview of the BucketList project

๐Ÿ”‘ takeaways:
๐Ÿ‘‰ If structs confirm to comparable protocol, they are sorteable
๐Ÿ‘‰ You can save data directly to the documents directory
๐Ÿ‘‰ Use enums to show different states of UI

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) ๐Ÿ‘‡

Follow

RSS Feeds