(OLD) Working with dates – BetterRest SwiftUI Tutorial 3/7

(OLD) Working with dates – BetterRest SwiftUI Tutorial 3/7

Paul Hudson

4 года назад

8,187 Просмотров

In this project we build a sleep prediction app using Core ML.

This is part of the Hacking with iOS tutorial series, which teaches SwiftUI for free. You can read it online here: https://www.hackingwithswift.com/books/ios-swiftui

Тэги:

#xcode #swift #swiftui #ui #ios #programming #tutorial #example #project #code #uikit #core_ml
Ссылки и html тэги не поддерживаются


Комментарии:

@MikeWilliamson_this_is_mvw
@MikeWilliamson_this_is_mvw - 30.06.2021 11:20

There are actually 11 days missing, not 12: 14 - 2 = 12, but one of those days is simply the difference between "today" and "tomorrow". (Ie, when the calendar "jumps" from 2 to 3, we don't say that one day is missing.)

Not meant to be annoying, just in case you ever revisit and edit these tutorials.

I'm loving the tutorials: I am very experienced in the back end, but just taking my first foray into mobile and front end, and these tutorials are helping *so much*. I wish there were something as good on the Android side of things.

Ответить
@hrishikeshkale8403
@hrishikeshkale8403 - 07.05.2021 17:54

Hey Paul, I guess with new swift the DateComponents() needs some tweaking can you help with it:
especially with the following section:
var components = DateComponents() 
components.hour = 8 
components.minute = 0 
let date = Calendar.current.date(from: components)

its throwing errors such as "can't use components inside.." also add ";" to continue the declaration, I am using Xcode 12.4

Regards :)

Ответить
@ricardoochoa5287
@ricardoochoa5287 - 21.12.2020 07:39

Thanks u very much!!!! u help to understand !! im starting to learn all about iOS Develop! and im watching all ur videos about SwiftUI <3

Ответить
@alibavafa2094
@alibavafa2094 - 27.10.2020 16:07

Hey Paul... Thanks for the great content.
I have a question off the subject:
what do you use for recording your screen?

Ответить