Hi. It was extremely helpful for me to refer to your video to replicate “delete-with-swipe” feature in the iPhone’s Notes App. I almost lost my hope when I found out your video! It helped me a lot to implement the feature I want. I had to do a little bit of extra work like adding completion handler, but I did it! Thank you for making such a great video!
@brandonmaul Жыл бұрын
Kit you're quickly becoming one of my favorite content creators. (not just iOS/Swift creators, KZbin in general). Love the humour, the brilliant education, and of course a voice that could rival Morgan Freeman. Please keep up the good work!
@kitlangton Жыл бұрын
😍 You are too kind! And don't worry, I intend to keep up the pace for the rest of the year, at least. Surely by then, I'll be the Mr. Beast of SwiftUI minutiae, with tens of billions of subscribers. 🤞
@movietime345 Жыл бұрын
incredible care for details, as always! enjoyed the interpolating spring analysis a lot. looking forward to the next one!
@kitlangton Жыл бұрын
That's great to hear 🥰 I'm glad you liked that part! I really wasn't sure if anyone else would care, but I really wanted to understand what the heck was going wrong 😄
@cangunsiray Жыл бұрын
This is super helpful! Looking forward to your upcoming iOS development content.
@buresdv Жыл бұрын
Hey Kit, thanks for another amazing tutorial! Your videos seem to have some magic to them; when I read or watch most tutorials on the internet, I really struggle to comprehend anything. But your videos, damn… everything clicks immediately! I still use the techniques you showed in the "Building a snippets app" video. It would not be far from the truth to say that your videos elevated me as a developer more than anything else. Hats off to you, keep making these amazing videos! This might be a longshot, but I have always struggled with view models. I have been trying for months, but I just can't wrap my head around them at all. Would you be open to making a video about what they are, how to use them, etc? That would be sweet… and I would finally understand them 😆
@kitlangton Жыл бұрын
Wow. That's so wonderful to hear 🤗 I'm very glad I could be of help. As to your question: Not a long shot at all! That sounds like a great topic. I'd guess that part of the confusion is just because the term itself is somewhat confused-I'm not sure if there's really one great definition of "View Model". I've seen the precise definition change through the years, between contexts. But I'll start doing some research on that and see if I can't put together something interesting. Sounds like a fun challenge! Let me know if there's anything specific related to that you'd like me to attempt to cover. And thanks again for the very kind comment.
@buresdv Жыл бұрын
@@kitlangton Oh wow, that's really amazing! I will write up an entire essay about the parts I'm struggling with and send it to you for inspiration 😂
Жыл бұрын
This is absolutely amazing content! I love your calm presentation style and in-depth walkthroughs, this is the second video of yours I'm watching. You just gained a new subscriber. I remember struggling a couple of months back with this exact problem, trying to create a satisfying card flicking interaction. I heard of wave before but never really explored it fully. The SwiftUI documentation seemed particularly poor, at least from a casual stroll on the Github page. My only question would be: do you expect this to have a significant effect on performance? From my understanding, handling the return animation natively, SwiftUI avoids changing the offset state and thus avoids re-rendering the view multiple times, where as with Wave you are redrawing the view constantly to drive the animation. Then again, you are re-rendering everything when dragging the rectangle around anyway, so it probably has about the same effect on performance.
@kitlangton Жыл бұрын
Firstly, I'm super glad you're enjoying the videos 😊 and this particular video was relevant! Regarding your question, you've pretty much nailed it with: "Then again, you are re-rendering everything when dragging the rectangle around anyway, so it probably has about the same effect on performance." Now, one should still be careful that not too many views are re-rendered when the gesture state changes. But in my experiments, this seemed to be performant enough. One quick note, for extracting maximum performance, there is a note in the Wave docs here about setting the CADisableMinimumFrameDuration key to true: github.com/jtrivedi/Wave#installation That being said, I'm thinking of doing another video where we implement something like Wave ourselves-and I'm certainly going to do some research to see how to get this to work with SwiftUI as smoothly as possible, for both performance and ergonomics. And I'll report back with what I discover! 🫡 Thanks again for subscribing and the kind words! See you around, Philip!
@quentinfasquel57284 ай бұрын
Really enjoyed this, thanks. I wonder if iOS 17's CustomAnimation protocol could be the missing piece to replace the Wave library. The library seems to be perfect but it's always nice to find a solution that's without any third-party library. CustomAnimation allows to implement interruptible animations, but is far less easy than this solution using Wave.
@BekaDemuradze Жыл бұрын
Me: 10 years ago there was a trend on KZbin writing comments like "First !". Back in that time I laughed on it, and thought it was pointless... Also me: FIRST !!!!!!!
@kitlangton Жыл бұрын
Sweet victory!
@samldev Жыл бұрын
Great video!
@kitlangton Жыл бұрын
Glad you enjoyed it! 🫡
@808richforever Жыл бұрын
Thanks!
@moyerr Жыл бұрын
Another great video as always! I'm very curious to see how you make the passing of the actions more idiomatic SwiftUI in your next video. I think there are a few strategies for this. I went down a somewhat similar path in trying to recreate the ergonomics of SwiftUI's .alert(_:isPresented:actions) modifier.
@kitlangton Жыл бұрын
Firstly, thank you very much! Haha, you've been here since the beginning it seems. The support is greatly appreciated ❤️ As to your question: My plan is to use `resultBuilder`, so I can achieve a similar effect to the built-in API. Of course, because SwiftUI is SwiftUI, you're allowed to pass regular SwiftUI Buttons along, as SwiftUI can access all the fun private properties-pulling the label and action out of the button struct. Because we don't have that power-at least, without mirrors, which seems dangerous-we''ll have to make some custom, constrained `Action` struct along with a corresponding ActionBuilder. It should be a fun exercise! First, I'm going to record a deep dive on resultBuilders though-and then come back and clean up our Swipe Actions. Of course, let me know if you have any other ideas 🤠 Also, I'd love to hear of your struggles with recreating .alert! Did you come up with a solution you're happy with, or still searching? Because, if not, that sounds like a fun video topic 🧠
@moyerr Жыл бұрын
@@kitlangton The thing that intrigued me about .alert is that the actions passed in are not a bespoke resultBuilder type (like ToolbarContentBuilder, for example)...it's just a regular viewBuilder that ignores everything except buttons. But how? The key (as far as I can tell) turns out to be a combination of two underscored-but-public APIs: _VariadicView and _ViewTraitKey These two APIs are linked: _VariadicView allows for iteration over a view's children. However, it doesn't provide the raw child views. Instead it provides a mostly-opaque representation of the children. One of the few APIs available on this child view representation is a subscript that accepts a _ViewTraitKey type, providing the ability to pull out certain values from child view - like say, a flag indicating whether or not that child is a button! It's not possible to create an API exactly like alert that defines its actions with Buttons, since there must be trait keys internal to the Button type, but we can get close with a custom ActionButton view and our own self-defined trait keys.