UserDefaults Swift

UserDefaults Swift

Rebeloper - Rebel Developer

3 года назад

3,438 Просмотров

Ссылки и html тэги не поддерживаются


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

@rebeloper
@rebeloper - 13.10.2020 16:49

Do you use UserDefaults in UIKit and SwiftUI too?

Ответить
@GeromeJanL
@GeromeJanL - 24.08.2022 03:25

Error encountered in downloading the resources: Error 1016

Ответить
@Venaber
@Venaber - 02.08.2022 22:06

thanks

Ответить
@captainmichaelj2321
@captainmichaelj2321 - 29.07.2022 18:21

In certain sense, swiftUI is more powerful because the AppStorage allows saving of a struct or class. But it doesn't seem to be the case for UIkit.

Ответить
@darinburch9043
@darinburch9043 - 28.01.2021 07:34

THANK YOU FOR ALSO INCLUDING SWIFTUI!

Ответить
@ulisesgarcia8960
@ulisesgarcia8960 - 23.11.2020 17:14

How can I save multiple "Data Structures" objects in UserDefaults? I am using UserDefaults to save different User routes, for this I create a Data Structure with the fields that correspond to a route (date, street, name, latitude, longitude) so far I have been able to save the structure with UserDefaults, however when I want adding a new route deletes the previous one and only keeps the last one, how can I store all the routes without deleting the previous ones? HELP!!!!

Ответить
@pinguinchieftain8757
@pinguinchieftain8757 - 18.11.2020 23:12

Thanks sir. 588 views... You deserve more.

Ответить
@user-rc2nt1tb2u
@user-rc2nt1tb2u - 25.10.2020 08:05

Hello ,
I'm using UserDefaults to save scores for different game levels but when new score is updated the rest update to the same value , tried it with an array it crashed saying "index out of range "

Ответить
@OlyaTimina
@OlyaTimina - 17.10.2020 23:49

We can save in UserDefault this object - user = [User(name: "Bob", secondName: "Macdonald"), User(name: "Jacob", secondName: "Arthur")] Thanks for answer )

Ответить
@OlyaTimina
@OlyaTimina - 16.10.2020 00:33

Thank you for video )

Ответить
@StewartLynch
@StewartLynch - 14.10.2020 07:47

You don't need to quit Xcode after creating the AppGroup. Just keep tapping refresh and it will eventually turn from red to selected.

Ответить
@user-mj4yt5ly8p
@user-mj4yt5ly8p - 13.10.2020 23:49

Cool! btw how do you think, what is the best way to start learning swiftUI?

Ответить
@seanvoong4328
@seanvoong4328 - 13.10.2020 18:35

Excellent tutorial!! May i know the difference between @Published and @Published("profile")?

Ответить