Computed property  in Swift | Swift for beginners | Property in swift 5

Computed property in Swift | Swift for beginners | Property in swift 5

Code Cat

4 года назад

11,696 Просмотров

Computed property in swift is an interesting topic as you can write code inside a property in swift.Property in swift are of various types and play a key role in ios project development but it's important to know when would be the right use case to use a particular property in swift.

This computed property swift tutorial has some tips on how to use the computed property in the right way and avoid the common mistakes that swift programming beginners do while computed property.

It’s important to know as a swift programmer as when to use the computed property. Computed property in swift should be used in special scenarios and not all the time and hence with this video I try to show what those special scenarios could possibly look like.

I think it’s more important to use them when you have a small functionality as the one explained in this swift tutorial for the computed property.

This computed property swift example tutorial is a part of the swift beginner series playlist and if you are a swift beginner then I would request you to explore the beginners' playlist to take your first step in becoming a swift programming expert.

If you like this video please like it and share it with your friends and if you are a new subscriber then please do subscribe to the channel.

Swift Tutorial for Beginners playlist: http://tiny.cc/9kh9hz

Given are the link to download the code from
Github:

Google Drive:

Music: https://www.bensound.com/

Connect with me on social media

Email: [email protected]
Twitter: https://twitter.com/codecat15
Facebook: https://www.facebook.com/code.cat.792
Github: https://github.com/codecat15

Тэги:

#computed_properties_swift #computed_properties_swift_tutorial #computed_properties_swift_hindi #computed_property_swift_hindi #computed_property_swift_example #computed_property_example #swift_5_tutorial_in_hindi #swift_5_hindi_tutorial #swift_property #swift_property_in_hindi #swift_5_tutorial_latest_in_hindi #property_in_swift #computed_property_in_swift #what_is_type_property_in_swift #swift_for_beginners #computed_property
Ссылки и html тэги не поддерживаются


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

Mandeep Singh
Mandeep Singh - 03.07.2020 15:14

Ravi sir, With the help of this video , I explain in an interview what is computed property and how it work with this simple example.
I also answered few more questions and I was hired in good company.
Thanks Sir

Ответить
AS
AS - 09.09.2021 14:33

bhai just love your videos <3 swift ke tutorials yha english me basics nhi milte vaha aap hindi me itni accche se properly bata rhe love your way of teaching choti choti chijo pe bhi dhayan dete ho

Ответить
NJ_Coder
NJ_Coder - 10.08.2021 02:03

one of my friend "Raman" overuses it alot. for populating the tableview cell he always makes the computed property in tableviewcell class

Ответить
priyanka maurya
priyanka maurya - 06.08.2021 11:13

Sir is there any difference between function and computed property?

Ответить
Sachin Shinde
Sachin Shinde - 02.08.2021 14:42

Thanks friend,
Your videos are relay helpfull

Ответить
Akshay Gajarlawar
Akshay Gajarlawar - 23.06.2021 15:50

In my project, I used computed properties to deal with UserDefaults. I've put all the code related to UserDefaults in one single file, create helper class there (MyUserDefaults), mark each variable (computed property) as static. So I can use it like:

MyUserDefaults.theme = "Dark" : to write
MyUserDefaults.theme : to read

Is this a good approach?

Ответить
kalomanik - The Ghontu Singh
kalomanik - The Ghontu Singh - 06.04.2021 23:12

Best video on computed property

Ответить
Keshav Mahur
Keshav Mahur - 16.03.2021 19:49

sir yeh get set lgane hote hai kya for input and output in this properties

Ответить
Om Bhagwan
Om Bhagwan - 03.01.2021 19:20

can I use observer property for the same . If yes how to differentiate between observer and computed property

Ответить
Hardip gajera
Hardip gajera - 31.07.2020 14:46

very helpful !

Ответить
Ranvir Singh Rana
Ranvir Singh Rana - 26.01.2020 06:38

Nice man

Ответить
Parvinder Singh
Parvinder Singh - 16.01.2020 14:55

thankyou sir, keep it up ...

Ответить
Swapnil Madav
Swapnil Madav - 11.01.2020 04:06

Nice sir

Ответить
jasmin pethani
jasmin pethani - 31.12.2019 22:29

Can you make video on "Opaque types" ? Feature from swift 5.1

Also some advance topics like @propertywrapper

Ответить
madmax coder
madmax coder - 30.12.2019 21:31

This channel deserves more subscribers than it has now coz the depth of knowledge is simply amazing.

This channel is the best swift tutorial for beginners and experienced developers, the style, the presentation, the examples are too good.

Glad i found this channel which explains complex topics with such ease 👍 Good job buddy

Ответить
NatureLovers Pakistan
NatureLovers Pakistan - 30.12.2019 19:36

sir please make a tutorial on abstraction and difference between frame and bounds. basic but very conceptual

Ответить
NatureLovers Pakistan
NatureLovers Pakistan - 30.12.2019 19:33

nice tutorial .... ziada ter junior Developers ko nae pta hota... computed properties ke bary me

Ответить
NatureLovers Pakistan
NatureLovers Pakistan - 30.12.2019 19:32

i prefer computed priorities rather then making a function ...
adding a simple example

class Person {
var firstName: String?
var lastNamr: String?
}
// computed properties
extension Person {
var fullName: String {
return "\(firstName ?? "") \(lastName ?? "")"
}
}

Ответить