donny wals
donny wals
  • Видео 30
  • Просмотров 33 941
Programmatic Navigation in SwiftUI explained
In this video we take a look at how you can leverage SwiftUI's NavigationStack, NavigationPath and navigationDestination to build an app that can leverage programmatic navigation.
This video is a companion video for www.donnywals.com/programmatic-navigation-in-swiftui-with-navigationpath-and-navigationdestination/
Level up your Swift Concurrency skills with my concurrency course: donnyplus.com/p/practical-swift-concurrency-the-video-course
Просмотров: 1 909

Видео

How to decide between a Set and an Array in Swift?
Просмотров 27621 день назад
Learn how you can decide between a Set and an Array in Swift. We go over their semantics as well as their core performance characteristics. Level up your Swift Concurrency skills with my video course: donnyplus.com/p/practical-swift-concurrency-the-video-course This video is a companion for my blog post about the same topic: www.donnywals.com/how-to-decide-between-a-set-and-array-in-swift/
Let's build an app with iOS 18's new sidebar!
Просмотров 1,1 тыс.21 день назад
In this video I explore iOS 18's new sidebar and tab bar hybrid by building a tab bar that works well on both iPhones, iPads, and iPads in split-view mode too. I'm using Xcode 16's beta to explore this upcoming feature. We'll leverage size classes and SwiftUI's environment to support smaller screens as well as the iPad's larger screen.
Build a stretchy header with SwiftUI on iOS 18
Просмотров 1,3 тыс.21 день назад
Let's take a look at SwiftUI's new onScrollGeometryChange view modifier to create a stretchy header effect with little to no workarounds!
WWDC 2024 recap - Apple Intelligence and more
Просмотров 37121 день назад
Apple's WWDC 2024 event happened yesterday and the Keynote was packed with amazing features. In this video I share a developer's perspective on the Keynote and everything that was announced. From visionOS, iOS, iPadOS, macOS and watchOS all the way to Apple's new intelligence features that will release later this fall.
Swift’s “if” and “switch” expressions explained
Просмотров 23528 дней назад
In this video we dig into if and switch expressions in Swift. They make conditionally assigning properties in Swift much cleaner than before! This post is a companion for my blog post on the same topic: www.donnywals.com/swifts-if-and-switch-expressions-explained/ Improve your Swift Concurrency skills with my video course: donnyplus.com/p/practical-swift-concurrency-the-video-course
@preconcurrency usage in swift explained
Просмотров 454Месяц назад
In this video we'll look at how you can start migrating to strict concurrency checking and Swift 6 gradually. We'll go over importing modules that haven't been updated to strict concurrency as well as updating modules to use strict concurrency without having to ship breaking changes as a library author. Learn more about concurrency in Swift with my course: donnyplus.com/p/practical-swift-concur...
Defer in Swift explained
Просмотров 408Месяц назад
Learn everything you need to know about Swift's defer keyword in this short video. This video is a companion for this blog post: www.donnywals.com/what-is-defer-in-swift/
Deciding between a computed property and a function in Swift
Просмотров 5482 месяца назад
In this video we explore Swift's computed properties and I talk about the different things I consider when deciding which type of property I should use. This video is a companion video for: www.donnywals.com/deciding-between-a-computed-property-and-a-function-in-swift/ Level up your Swift Concurrency skills with my course: donnyplus.com/p/practical-swift-concurrency-the-video-course
Avoid App Store Rejection! Add a Privacy manifest to your app today
Просмотров 8212 месяца назад
Learn how you can add a privacy manifest file to your Xcode project to make sure that you comply with Apple's newly introduced Required Reason API Declaration requirements. Avoid Missing API Declaration (ITMS-91053) rejections and add your manifest today. In this video you'll learn how you can create a privacy manifest file in Xcode and how you can use www.privacymanifest.dev to generate your m...
How to use experimental Swift versions and features in Xcode?
Просмотров 2562 месяца назад
In this video we'll dig into how you can leverage experimental toolchains and feature flags to test new Swift versions before they're released. Watch me download a new toolchain, install it, enable it in Xcode, and then I actually add a feature flag to test our region based actor isolation. Level up your Swift concurrency skills with my course: donny-wals-s-school.teachable.com/p/practical-swif...
Actor Reentrancy in Swift explained
Просмотров 1,1 тыс.2 месяца назад
In this video we'll explore a complicated topic called actor reentrancy. You'll find out why adding async methods to your actors can yield unexpected and undesired results. You'll also learn about one possible way to solve a specific form of actor reentrancy that leverages caching unstructured Tasks. This video is a companion for my blog post on the same topic: www.donnywals.com/actor-reentranc...
Using Closures as Dependencies
Просмотров 1,1 тыс.3 месяца назад
In this video we'll explore an alternative way of injecting functionality into your objects. You'll see how you can use closures to inject only the functionality you really need rather than an entire object which makes scoping your dependencies much easier, as well as improving composability and testability of your code. This video is a companion video for the following blog post: www.donnywals...
Building an AsyncSequence with AsyncStream.makeStream
Просмотров 4503 месяца назад
In this video you'll learn how to use Swift 5.9's AsyncStream.makeStream method to build custom async sequences. You'll learn about its usage as well as its caveats. This video is a companion for this blog post: www.donnywals.com/building-an-asyncsequence-with-asyncstream-makestream/ Other blog posts worth reading: - Understanding Swift Concurrency's AsyncStream: www.donnywals.com/understanding...
Five tips and tricks for exploring a new codebase
Просмотров 3203 месяца назад
In this video we take a look at some of the most important tips and tricks that I have learned about exploring codebases in practice. Does it make sense to jump in without a plan? You'll learn everything you need to know in this video. Level up your Swift concurrency skills with my course: donny-wals-s-school.teachable.com/p/practical-swift-concurrency-the-video-course Or check out my books: do...
Working with dates and Codable in Swift
Просмотров 4193 месяца назад
Working with dates and Codable in Swift
Customizing how Codable objects map to JSON data
Просмотров 4783 месяца назад
Customizing how Codable objects map to JSON data
An introduction to JSON Parsing in Swift
Просмотров 6854 месяца назад
An introduction to JSON Parsing in Swift
What's new in Swift 5.10
Просмотров 3,7 тыс.4 месяца назад
What's new in Swift 5.10
Comparing @Observable to ObservableObjects in SwiftUI
Просмотров 1,2 тыс.4 месяца назад
Comparing @Observable to ObservableObjects in SwiftUI
Designing APIs with typed throws in Swift
Просмотров 7294 месяца назад
Designing APIs with typed throws in Swift
How to determine where code runs in Swift Concurrency
Просмотров 2,2 тыс.4 месяца назад
How to determine where code runs in Swift Concurrency
Writing code that makes mistakes harder
Просмотров 5975 месяцев назад
Writing code that makes mistakes harder
Conforming your SwiftData objects to Codable
Просмотров 1,7 тыс.10 месяцев назад
Conforming your SwiftData objects to Codable
Binding vs. Bindable in SwiftUI on iOS 17
Просмотров 9 тыс.Год назад
Binding vs. Bindable in SwiftUI on iOS 17
SwiftData live stream June 6th, 2023
Просмотров 951Год назад
SwiftData live stream June 6th, 2023
WWDC Watch Party - Advanced Combine
Просмотров 7054 года назад
WWDC Watch Party - Advanced Combine

Комментарии

  • @gerardgomez5987
    @gerardgomez5987 3 дня назад

    Is there currently a way in iOS 18 to hide TabSection headers in the TabBar view while keeping them visible in the Sidebar view and, importantly, while still showing the tabs themselves in the TabBar.

    • @gerardgomez5987
      @gerardgomez5987 3 дня назад

      Never mind, I was able to use isTabBarShowingSections Environment Value. although I would much appreciate a tabSectionHeaderVisibility(.sidebar) modifier instead of using a if statement.

    • @gerardgomez5987
      @gerardgomez5987 3 дня назад

      That did not work

  • @ivanmatkovic
    @ivanmatkovic 3 дня назад

    When viewModel is @Observable, you dont need @State in the View. Great video btw

    • @DonnyWalsdev
      @DonnyWalsdev День назад

      You do if that view creates/owns the state. Otherwise every time a new struct instance is made a new instance of the Observable is made.

  • @marksiracusano9931
    @marksiracusano9931 5 дней назад

    How would you handle the path if you have a tabView with different navigations for each tab? I guess every tab would have a a NavigationStack with their own path, right? If so, what if you need new paths further down those flows? Like a child coordinator situation? Should you nest NavigationStacks?

    • @PtolemysEye
      @PtolemysEye 3 дня назад

      Each tab view should have it's own navigation stack

    • @DonnyWalsdev
      @DonnyWalsdev День назад

      You’d have a dedicated path for each tab. Not sure what you mean by needing new paths later on. You shouldn’t nest navigation stacks, flows later on should use the same path that the stack that contains them would use. Of course, sheets can have their own navigation stacks if needed; you just shouldn’t nest them

  • @hami1705
    @hami1705 7 дней назад

    post more videos like this

  • @indomitabletr1834
    @indomitabletr1834 10 дней назад

    how would it be if I was in iOS 14

  • @indp8752
    @indp8752 10 дней назад

    When you add an Exercise to path, how does it know that it has to show the Exercise view ?

    • @DonnyWalsdev
      @DonnyWalsdev 7 дней назад

      Through the navigationDestination view modifier that I applied to one of the parent views

  • @enriqueduran6548
    @enriqueduran6548 14 дней назад

    EXCELENT

  • @indiekiduk
    @indiekiduk 14 дней назад

    It’s strange that navigationDestination doesn’t go through the PreferenceKey’s reducer like navigationTitle does which is how it can be overridden without a warning. Maybe was implemented by a different dev at Apple.

  • @MarcosSuarezAyala
    @MarcosSuarezAyala 14 дней назад

    Thanks for the video, I have a question with the implementation of navigation with the NavigationStack. How do I control the navigation? In the case that I only want to navigate when I have received an OK response from the API, if the response has given me an error, I do not perform the navigation and show a pop up. How is this implemented with the NavigationStack?

    • @fitzventure
      @fitzventure 13 дней назад

      This is the one use case nobody covers in any tutorials. I know because I just struggled to figure it out. Say you have a view that displays on initial open of the app, it checks if the user is logged in and navigates to a login page if not. How do you handle that? I turns out , you use a single navigation destination modifier on the root nav stack and a case statement inside that destination checks the path (which you can use and enum for). Think of the navigation destination as a controller for navigation. This would make a great video because it's so common but there's nothing out there explaining it. Hope that helps.

    • @MarcosSuarezAyala
      @MarcosSuarezAyala 13 дней назад

      @@fitzventure Thanks. Now I'm using HomeRoute with enums and special func loadData, I don't like this approach but it's the only thing I can think of for now. @MainActor func loadData(for route: MoviesRouter) async throws { switch route { case .detail(let movie): do { try await Task.sleep(nanoseconds: 5_000_000_000) throw(NSError(domain: "error", code: 1)) // To test error moviesRouter.append(.detail(movie)) } catch { throw(error) } } } And call it in button inside the view Button("Go to a random Movie") { guard !viewModel.list.isEmpty, let randomMovie = viewModel.list.randomElement() else { return } showLoader.toggle() Task { do { try await homeRouter.loadData(for: .detail(randomMovie)) showLoader = false } catch { showLoader = false showError = true } } } .buttonStyle(.borderedProminent)

  • @benceylan273
    @benceylan273 17 дней назад

    Background music was distracting sorry.

  • @Zetesee
    @Zetesee 18 дней назад

    Hey Donny - I'm not sure if thats your name if not sorry for that. I hope this message finds you well! 🙂 I recently discovered your RUclips channel while scrolling homepage and found your content to be amazing and incredibly helpful. I have a cooperation proposal for you and would love to discuss it further. It could improve your channel. Please let me know if you're interested! Email address will be great :D

  • @tsbob7847
    @tsbob7847 21 день назад

    Thanks for the video. I’m new to iOS programming. ForEach wants an ordered collection so the set has to be sorted. A number of other SwiftUI things seem to be oriented around arrays. Is this the case in general for SwiftUI? Set Vs Array is insignificant in my small app but curious about SwiftUI Vs data efficiency. Does @Observable mean no longer sorting for every screen update, only if the set changes? Is there a good article on this? Thanks again.

    • @DonnyWalsdev
      @DonnyWalsdev 21 день назад

      I’d say most UI related collection work should be done with array since you don’t want things jumping around in your UI due to Set being unsorted. I don’t know of an article covering the specifics here but @Observable would mean that your UI is stable until the next screen redraw and the Set is accessed again. I would recommend converting to an Array so you have guaranteed stable ordering.

    • @tsbob7847
      @tsbob7847 20 дней назад

      @@DonnyWalsdev Thanks for the response. Obvious from the UI perspective - head slap. Arrays planned for “normal usage” views of item subsets but no fundamental order to the underlying items themselves so I’m starting with a set and a “management/debug” view. Lots to learn. Very different perspective from real time microcontroller systems but I’m enjoying it. I appreciate the info people like yourself, Paul Hudson, Stewart Lynch and others make freely available. They are great learning tools and benefit so many.

  • @chezchezchezchez
    @chezchezchezchez 21 день назад

    I have drums in my computer room! HAHA

  • @xzilja
    @xzilja 22 дня назад

    Hard to tell from the video, but did you by any chance notice a bit "out of sync" in scrolling and transitioning when using this modifier? I just did simple recreation with it and GeometryReader and it seems as if geometry reader is more accurate "reactive". Particularly when scrolling super slow

    • @DonnyWalsdev
      @DonnyWalsdev 21 день назад

      I didn't notice any, but I also have to admit I didn't compare and do super slow scrolls so you might be right. Wonder about the overall performance difference though; GeometryReader in general is very slow. It'd be interesting to compare performance on increasingly large and complex views to see if one breaks down where the other doesn't

  • @user-jj2jf7hf5q
    @user-jj2jf7hf5q 22 дня назад

    Kudos to the author. First time I hear simple and elaborated explanation about threads which will be used to run task or specific method.

  • @edhahaz
    @edhahaz 24 дня назад

    3 UIs into one lol... flutter devs screaming rn

  • @smotch7533
    @smotch7533 25 дней назад

    if I choose regular does it match all devices larger than iPad, TV or Vision Pro for example

    • @DonnyWalsdev
      @DonnyWalsdev 25 дней назад

      Yes, those should all be regular too. Good to know is that macOS is always regular regardless of your window’s size

    • @smotch7533
      @smotch7533 25 дней назад

      @@DonnyWalsdev oh interesting!

  • @TwinkyEnterainment
    @TwinkyEnterainment 26 дней назад

    Might need to send this to one of the speakers at iOSKonf in Skopje about the scrollView problem :D. Great work as always Donny!

  • @w0mblemania
    @w0mblemania 26 дней назад

    Donny, at the beginning of the video, the list of items is overlapping the header in a nasty way. This may be because you have set a fixed height for the rectangle (300 pts). So the image height is being adjusted dynamically, but the rectangle is not. Cheers.

    • @DonnyWalsdev
      @DonnyWalsdev 26 дней назад

      Do you mean there’s a glitch while I’m messing around with scrolling in the beginning? Not sure why that happened. Changing the rectangles height causes the entire scroll view to glitch unfortunately; otherwise the header image could have been in the scroll view and we wouldn’t have needed the ZStack at all.

    • @jrgibson
      @jrgibson 16 дней назад

      @@DonnyWalsdev I noticed that glitch happens with my app in 18 too, I raised feedback for it.

  • @tokero5199
    @tokero5199 27 дней назад

    Cool. Now we just have to way a few years to be able to use it because Apple does not want to backport UI like Android has AndroidX....

  • @iLoveAppl3947
    @iLoveAppl3947 27 дней назад

    jizz man...WWDC24 is not finished yet and fanboys already making videos...chill

    • @DonnyWalsdev
      @DonnyWalsdev 27 дней назад

      Why wouldn’t I make a quick video about a view modifier I like?

  • @slmille4
    @slmille4 27 дней назад

    I'm really curious whether App Intents will expand beyond just being voice activated shortcuts to making it possible to quickly surface relevant information out of 3rd party apps.

  • @chezchezchezchez
    @chezchezchezchez 28 дней назад

    This is great. Thanks, Donnie.

  • @nigelgee3576
    @nigelgee3576 28 дней назад

    Can you have a ‘var’ then able to change the value again?

  • @MarijaJuodyte
    @MarijaJuodyte Месяц назад

    Thank you!

  • @ashleydube3710
    @ashleydube3710 Месяц назад

    Thanx

  • @indiekiduk
    @indiekiduk Месяц назад

    Hopefully this is the nail in coffin for view models and everyone finally learns structs!

    • @DonnyWalsdev
      @DonnyWalsdev Месяц назад

      I doubt it. SwiftUI and @Observable very strongly rely on (view)models being defined as classes

    • @indiekiduk
      @indiekiduk Месяц назад

      @@DonnyWalsdev view models are view structs. @ observable is for model data

  • @BookmarkMountain
    @BookmarkMountain Месяц назад

    Really well explained thank you!

  • @wjcnwjcn
    @wjcnwjcn Месяц назад

    What about this? ruclips.net/video/_XZHzl3R1Fo/видео.html

    • @DonnyWalsdev
      @DonnyWalsdev Месяц назад

      What about it? Is there something specific from that video you think I should look at?

  • @nicolaiharbo2201
    @nicolaiharbo2201 Месяц назад

    I’ve been aware of the feature for a long time, but never found a reason to use it honestly. Always thought of it, as a bit useless. Is it something you use often, and if yes, for what? Like, very specific use cases would be appreciated 😊

    • @DonnyWalsdev
      @DonnyWalsdev Месяц назад

      I don't use it often. Mostly for stuff like in the example from the video where there might be multiple exit points for the function and I always need to unset/restore some state. It's useful for that, but not something I use very often

    • @markaurelius61
      @markaurelius61 Месяц назад

      It would be to close a connection to a database, for example. Many of the things that would have been useful for though are handled by ARC.

  • @toddlask
    @toddlask Месяц назад

    your videos are beyond my noobie level but really interesting!

    • @DonnyWalsdev
      @DonnyWalsdev Месяц назад

      Thanks! Are there any topics that you're currently learning about or interested in that I could cover?

    • @toddlask
      @toddlask Месяц назад

      @@DonnyWalsdev hey thx for asking! im kinda interested in the life cycle and object structure of a running app. like the dom in the old internet explorer. im an older programmer and want to understand the modern new ways of swift. im very curious how the app sees the environment variables and settings, other views and classes... i hope this makes sense.

  • @victorriurean
    @victorriurean Месяц назад

    👍

  • @alexandr8328
    @alexandr8328 2 месяца назад

    Hello! When is your Swift Concurrency course released? It says it is still in progress. Thx

    • @DonnyWalsdev
      @DonnyWalsdev Месяц назад

      Hey! The course should be finished in the next week or two. Plan was to have it fully done this week but I'm currently at a conference so that seems a little too ambitious. Almost all sections are finished except for the final one on TaskGroup and async let.

  • @nigelgee3576
    @nigelgee3576 2 месяца назад

    I know that you are using person name as an example code. But it should said that when dealing with with names that should use PersonNameComponentsFormatter as this will put the correct format for user locale

  • @srzurka
    @srzurka 2 месяца назад

    Thanks for the video. I concur. I would only add that, computed properties feel Swifty to me so I start with a bias towards using them, then change to a function when there's one of the situations that you've identified. (needs arguments, it's not lightweight, potential side-effects, etc)

  • @user-qg8nc5bk4p
    @user-qg8nc5bk4p 2 месяца назад

    Sound became better :) Could you please share your thoughts on usage of extensions, e.g. extending models with some methods, formatting methods etc. When an object that does something is better than extension of some model that handles the model certain way and returns the data I need, the only think that comes to my mind is inability to use DI in extension, so testability is limited for these functionality

    • @DonnyWalsdev
      @DonnyWalsdev Месяц назад

      I've added it to my (long) list of potential topics!

  • @tiagoalexbastos
    @tiagoalexbastos 2 месяца назад

    your videos are so good man, top tier content! Keep it up :)

  • @nigelgee3576
    @nigelgee3576 2 месяца назад

    Nice generator. I have already added it to my new project so I do not forget it. Is it required for TestFlight?

    • @DonnyWalsdev
      @DonnyWalsdev 2 месяца назад

      Not required for TestFlight but I’d recommend just adding it anyway :)

  • @venuvenu2719
    @venuvenu2719 2 месяца назад

    Awesome, Is the required reasons API, the only thing that needs to be added? What about privacy nutrition labels? Let's say, my app uses email id info and Username. What do I do here?

    • @DonnyWalsdev
      @DonnyWalsdev 2 месяца назад

      You should be adding them all. However, Apple will only reject you for not declaring required reason APIs.

  • @jairoalexanderlaurenteceli9966
    @jairoalexanderlaurenteceli9966 2 месяца назад

    Excelente video, muchas gracias por compartir información valiosa!!✌✌

    • @DonnyWalsdev
      @DonnyWalsdev 2 месяца назад

      ¡Gracias! Me alegro que te guste el vídeo

  • @victorriurean
    @victorriurean 2 месяца назад

    🔥

  • @filmaniac1984
    @filmaniac1984 2 месяца назад

    Thanks @DonnyWalsdev! Great example and well explained.

  • @roym27
    @roym27 2 месяца назад

    I had to stop watching because of the background music - it’s not great when you’re narrating as I was unable to focus on what you were saying.

    • @DonnyWalsdev
      @DonnyWalsdev 2 месяца назад

      I'll probably do a re-record of this video at some point without the bg music. It's a shame that it's not possible to "update" a video without a full reupload

  • @srinivasanmunna
    @srinivasanmunna 2 месяца назад

    This is a great one. I was actually expecting to see another dictionary variable that keeps track of running tasks. But the enum with associated type looks so much better.

  • @JumpingCow
    @JumpingCow 2 месяца назад

    Subtle and complex! Thank you.

  • @0xifarouk
    @0xifarouk 2 месяца назад

    This is amazing, thank you for the explanation 🙏🏻 Can we have a video on task cancellation please?

  • @bobdel
    @bobdel 2 месяца назад

    This video is very helpful. I am still confused by the body property. As I understand it, Body is annotated via a protocol to run on MainActor. Is this correct: a view such as the one in your example that does not have a @MainActor annotation, but the function is called from a task modifier inside the Body will run on the MainActor.

    • @DonnyWalsdev
      @DonnyWalsdev 2 месяца назад

      It's the opposite, unless the function definition itself has a @Mainactor annotation (or in other words, is isolated to the main actor) it doesn't matter where you call it from. The function itself decides where it runs and if it's not isolated to the main actor explicitly it will run in the background even if it was called from a main actor isolated spot

  • @muncho404
    @muncho404 3 месяца назад

    the title was enough to trigger my anxiety😅

  • @jyotinkarpandey
    @jyotinkarpandey 3 месяца назад

    Can we have a sample project link ?

    • @DonnyWalsdev
      @DonnyWalsdev 2 месяца назад

      Hey! So sorry, I don't have a (publicly available) sample project available for this.

  • @victorriurean
    @victorriurean 3 месяца назад