Загрузка...

Toggle in SwiftUI

#Toggle #SwiftUI​ #Swift​ #iOS​

In this video, I will introduce you to the Toggle view in SwiftUI. It’s a rather basic view and we go through the options to create one and use the different styles.
We will also create our own custom Toggle style which provides a powerful way of customization.

If you prefer written content, please have a look at my blog post on the topic:
https://stefanblos.com/posts/toggle_in_swiftui/

If you have any questions or ideas, please let me know in the comments.
I hope you enjoy the video. If you do, please like it and subscribe to my channel, there is a lot more content to come.

--------------
Timeline:
0:00​ Intro
0:05​ Overview
1:13 Creating a Toggle
4:24​ Styling a Toggle
6:42​ Creating a custom style
13:34​ Summary

--------------
Additional Links:

Toggle - Apple documentation
https://developer.apple.com/documentation/swiftui/toggle

What is the @Binding property wrapper?
https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-binding-property-wrapper

ToggleStyle protocol
https://developer.apple.com/documentation/swiftui/togglestyle

DefaultToggleStyle
https://developer.apple.com/documentation/swiftui/defaulttogglestyle

ToggleStyle protocol
https://developer.apple.com/documentation/swiftui/togglestyle

ToggleStyleConfiguration documentation
https://developer.apple.com/documentation/swiftui/togglestyleconfiguration

Trailing Closure posts
https://trailingclosure.com/custom-swiftui-toggles/

--------------
Connect with me:

My Twitter:
https://twitter.com/stefanjblos​​

My Website:
https://stefanblos.com​​

Видео Toggle in SwiftUI канала Stefan Blos
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять