Adding final optimizations | SwiftUI Crypto App #25

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 2024

ความคิดเห็น • 24

  • @Seesh98
    @Seesh98 ปีที่แล้ว +1

    Nick deservers more likes guys. This content is beyond amazing and insightful to such big components and he is doing all this for free. Really appreciate the content Nick

  • @sols.2525
    @sols.2525 3 ปีที่แล้ว +4

    I am unaware of a way to force the decimal pad on iPad. That is probably because on that size screen it would look ridiculous unless it became like a floating smaller keypad. However, I do know that on the simulator you can switch between light and dark mode with "command-shift-a" instead of going through the settings screen.

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +1

      And that is the method I will be doing from now on haha

  • @stefanlindholm3284
    @stefanlindholm3284 2 ปีที่แล้ว

    Another great video Nick! I just noticed one little bug. If I go to the portfolio view in the simulator, press the + to choose a coin that's already in the portfolio and change the amount holding, as I save it and click the X to go back to the portfolio, the information in the list has not updated (the Portfolio value up in the right corner has updated though). If I then go back to live prices wait for a second and go back to the portfolio, the portfolio will have been updated.

  • @AZMerf
    @AZMerf 3 ปีที่แล้ว +3

    Interesting. My math with the * 100 works. Portfolio Value (46417.79) - Previous Value (47088.15) = -670.36. Then -670.36 / 47088.15 = -0.14236. That * 100 = 1.42 which is correct. I ran with a bunch of print statements to show it works.

    • @KimbrellBrad
      @KimbrellBrad 3 ปีที่แล้ว +2

      Was going to say the same thing! Mine is fine as well. Odd...

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +4

      Between these videos, I had made a couple of other videos that I ended up removing from the course. There's a chance I had the issue only in my build lol Sorry guys!

    • @suryakantsharma6761
      @suryakantsharma6761 7 หลายเดือนก่อน

      I agree other wise for 1 holding it will not match with portfolio change :)

  • @KimbrellBrad
    @KimbrellBrad 3 ปีที่แล้ว +2

    Nice touches with those CPU improvements. Could really mean a lot in CPU-intensive apps. Thanks for the video Nick!

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว

      Yea, it didn't really affect our app much but it was good practice haha

  • @_Astr_
    @_Astr_ 2 ปีที่แล้ว +2

    I still use “initializing detail view” print statements from the video #18. And they were always called twice. (Xcode 12.4) However, .navigationViewStyle(StackNavigationViewStyle()) just solved this problem. Interesting…

  • @DaveJacobseniOS
    @DaveJacobseniOS 3 ปีที่แล้ว +2

    Amazing attention to detail. Not sure what I'm going to do when I finish the next video :(

  • @MatC-d7y
    @MatC-d7y 2 ปีที่แล้ว

    Really glad you showed how to set the retries on the network call. When I started coding, I never got a failure, now, almost every time it runs, I get 1 or 2 failed before it loads the coin data. The response is "error code: 303 [4: -2201]). I even saw them happening with the "reload" button.... I actually set retry to 10, and now no problem. More coffee when I've finished the course!

  • @youssefmohamed1551
    @youssefmohamed1551 7 หลายเดือนก่อน +1

    When will you make an advanced level app?

  • @Collins01
    @Collins01 2 ปีที่แล้ว

    Thanks Nick.

  • @yoavzv
    @yoavzv ปีที่แล้ว

    Hi nick, cool course. Thanks! One question, wouldn’t it be better to decode directly on the network manager using a generic decodable?

  • @Seesh98
    @Seesh98 ปีที่แล้ว

    Hey Nick. Loving the content.
    Just wanted to give you a heads up if you still want to update the app.
    So I noticed if you have nothing in your portfolio the percentageChange returns as 0 so here is my fix for that in the HomeViewModel:
    var percentageChange = ((portfolioValue - previousValue) / previousValue)
    if previousValue == 0.00 {
    percentageChange = 0.00
    }

  • @cinquain0
    @cinquain0 2 ปีที่แล้ว +1

    You should do a video covering the new async await syntax in Swift. Forget @escaping completion handlers, these are the future.

    • @SwiftfulThinking
      @SwiftfulThinking  2 ปีที่แล้ว +2

      That’s the whole next playlist 😂

    • @cinquain0
      @cinquain0 2 ปีที่แล้ว

      @@SwiftfulThinking oh snap! You’re the man

  • @mig12394
    @mig12394 3 ปีที่แล้ว

    interesting the explanation on threads

  • @raimitis
    @raimitis 3 ปีที่แล้ว

    Nick, thank you for great course. Your teaching style amaze me. Maybe you could update the course networking part. You use codable, but in there is new solution async Api which I saw is very easy to use, but I would like to know more and I know you will do it 😀
    Once again thank you for great job!!!

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว

      Thanks Raimonds!! I will cover the async api in it's own video after iOS 15 is released! However, I won't be updating the networking of this course because most production apps need to support older iOS versions and developers wont actually start using the async method for a few years. The way we're downloading also works very well for image caching and our app architecture.

  • @kuper3296
    @kuper3296 2 ปีที่แล้ว +1

    It’s not your math error.
    the problem is in the priorities of the execution of operators, namely the operator “*” has a higher priority than the operator “??”
    Wrong: coin.priceChangePercentage24H ?? 0 / 100
    Correctly: (coin.priceChangePercentage24H ?? 0) / 100