The Anatomy of a Key Path

Опубликовано: 18 Сентябрь 2021
на канале: Swift and Tips
3,258
177

Hello everyone, today we will learn what are keypaths in Swift, and why they are so important to build dynamic code that depends on properties, and not values.

Content:
0:00 - Intro
0:26 - Problems that Key Path solves
1:31 - What is a Key Path?
2:08 - The anatomy of a Key Path
5:02 - SwiftUI & Key Paths
7:04 - Creating a function with Key Paths
8:32 - WritableKeyPath
11:37 - ReferenceWritableKeypath
12:01 - PartialKeyPath
12:32 - AnyKeyPath
13:22 - Do you want to learn more?


------

Source code showed in the video: https://github.com/pitt500/swift-and-...

------
Resources:
* Swift.org: https://docs.swift.org/swift-book/Ref...
* KeyPath's proposal: https://github.com/apple/swift-evolut...
* John Sundell: https://www.swiftbysundell.com/articl...
* Ahmed Komsan: https://dev.to/ahmed_komsan12/keypath...

------
Other videos in the channel:
* Generics:    • Generics  
* Subscripts:    • How to use Subscripts in Swift: Expla...  
* More about Swift:    • Swift Language  


-----
Don't forget to subscribe to the channel, like it, and follow me on social media:

Twitter:
  / swiftandtips  
  / pitt500  

Finally, ask me for a video you would like to see next 😄!

Credits:
- Music by Wataboi from https://pixabay.com/
- Video edited with LumaFusion


Смотрите видео The Anatomy of a Key Path онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Swift and Tips 18 Сентябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,258 раз и оно понравилось 177 людям.