Property wrapper in swift | Property wrapper vs Extension
*#SWIFTUI :- #PropertyWrapper in swift *
This video covers :
1. What is a property wrapper in Swift?
2. What is an Extension.
3. Property wrapper vs Extension
4. why we need to use property wrapper .
5. In which situation you have to use property wrapper and extension.
6. What limitations does the Property wrapper have?
______________________________________________
Git Hub Source Code - https://github.com/raj-engineer/SwiftPlayground
_______________________________________________
*What is Property Wrapper in swift.*
Property wrappers were introduced in Swift 5.1 to allow users to add additional behavior to properties.
A property wrapper is a generic structure that encapsulates read and write access to the property and adds additional behavior to it
*What limitations does the wrapper have?*
Property wrappers come not without their price. They impose a number of restrictions :
1. Applying multiple wrappers to the property is not allowed. .
2. always need to defined with ‘@properWrapper’ and must have ‘wrappedValue’ property.
3. cannot be set as ‘lazy’, ‘weak’, ‘unowned’ or ‘@NSManaged’.
4. cannot be declared in protocol or extension.
5. cannot be overridden.
6. cannot have custom ‘get’ or ‘set’.
_____________________________________________________________
If You think this is Helpful for you so , please share and Subscribe my channel .
Good place to learn iOS Application Development , Swift ,SwiftUI. I try explain all the things in very simple and easy manner.
"If you can't explain it simply, you don't understand it well enough."
Albert Einstein
Видео Property wrapper in swift | Property wrapper vs Extension канала Rajesh Sharma
This video covers :
1. What is a property wrapper in Swift?
2. What is an Extension.
3. Property wrapper vs Extension
4. why we need to use property wrapper .
5. In which situation you have to use property wrapper and extension.
6. What limitations does the Property wrapper have?
______________________________________________
Git Hub Source Code - https://github.com/raj-engineer/SwiftPlayground
_______________________________________________
*What is Property Wrapper in swift.*
Property wrappers were introduced in Swift 5.1 to allow users to add additional behavior to properties.
A property wrapper is a generic structure that encapsulates read and write access to the property and adds additional behavior to it
*What limitations does the wrapper have?*
Property wrappers come not without their price. They impose a number of restrictions :
1. Applying multiple wrappers to the property is not allowed. .
2. always need to defined with ‘@properWrapper’ and must have ‘wrappedValue’ property.
3. cannot be set as ‘lazy’, ‘weak’, ‘unowned’ or ‘@NSManaged’.
4. cannot be declared in protocol or extension.
5. cannot be overridden.
6. cannot have custom ‘get’ or ‘set’.
_____________________________________________________________
If You think this is Helpful for you so , please share and Subscribe my channel .
Good place to learn iOS Application Development , Swift ,SwiftUI. I try explain all the things in very simple and easy manner.
"If you can't explain it simply, you don't understand it well enough."
Albert Einstein
Видео Property wrapper in swift | Property wrapper vs Extension канала Rajesh Sharma
Комментарии отсутствуют
Информация о видео
3 мая 2020 г. 19:22:38
00:05:59
Другие видео канала