One of the best channel for iOS development. Your teaching is unique you explain the things comparing to real world that is awesome, but if you can explain in English lot many members will watch your videos
Am glad this video was helpful Naresh, and welcome to the channel. I keep my videos in Hindi as lot of my audience wants me to keep it in Hindi but I do try my best to add captions in the video whenever I can buddy and once again thank you for your kind words
Hey Ravi, I am new to this channel but I have watched your most of videos in few days only and it was very helpful for me. I am very confused with the Provising Profiles like which certificate is used for which purpose. Can you make a video on that?
Hello Shubhangi, welcome to the channel and I am glad you found most of these videos helpful and worth your time. I will surely try to make a video on the provisioning profiles and their usage. Please do share this channel with your iOS developer friends or even beginners who are learning iOS development and swift programming on what's app or Facebook
Very well explained Ravi, now I got to know the actual difference between lazy and computed property. Could you please make a video on multithreading and how to make thread-safe properties .
more will be explained in a video than this comment but usually if you want something to just wait till you kick off another task I usually use serial queues, however I want to know if you are referring to a use case where two threads are trying to access a single resource? or something else because literally there are so many use case which I can think of here just want to get a use case similar to what you have in mind and maybe add two or three more examples to it.
Code Cat Yes Ravi, I would like to know that same time multiple thread accessing same resource.For example we are downloading multiple images and we want to pause , cancel without freezing UI. such kind of events by using operations and operation queues. If you can make video it . It would be more helpful for me . Because the way you explain. It’s hits me quickly with your examples 😊😊
This is a broader discussion but I did write a blog on this on medium, here’s the link for the same I hope it helps medium.com/swlh/how-to-start-your-journey-as-an-ios-developer-a23b835b1fed If the site does not open, please try the above in incognito mode
Hello Payal, welcome to the channel. I am glad this video was helpful to you. Plz do feel free to ask questions on this topic and do share the video with your iOS group on WhatsApp or Facebook 😊
Hello Ravi , thanks for amazing video. I tried to use Lazy , but when I try to use with "let" , compiler give me error "lazy can not be used on let" because in lazy variable as we saw , we can set value only once (unable to get updated value 100 when we set it ComplexTask.firstElement == 100) , so why "let" is not allowed ? also why static property and function , in this ComplexTask class ? is it related to lazy var or just demo purpose. and what will be best practice to use static variable or instance variable.
Object mapping is where you assign value from object a to a similar property in object b. There are various ways to achieve this but the one way i can tell you is the decodable protocol where swift does mapping of our json object to our swift models. I have few examples in the api series where am explaining this in detail Link: czcams.com/video/RiuvxmoU37E/video.html
lazy memory sy kab remove hota ha? suppose lazy assing and object of class is remove lazy will remove from memory ? second thiing suppose strong variable we created so object is not created will the veriable exist in memory or not
Its same like other objects agar koi strong reference aapne create nahi kiya hai to use case mai swift ARC aapke lazy object ko memory se clear kar dega. Class deallocate jab hoga tab aapka lazy object bhi memory se clear ho jayega. Maine ARC aur strong reference behavior ARC k video mai explain kiya hai aap usse check kare ARC k is behavior ko detail mai jaan k liye Link: czcams.com/video/XAlXnApplk0/video.html
From the Swift programming documentation: If a property marked with the lazy modifier is accessed by multiple threads simultaneously and the property hasn’t yet been initialized, there’s no guarantee that the property will be initialized only once. Source: docs.swift.org/swift-book/LanguageGuide/Properties.html
what do you think Priyanka? let's hear that out first and it's okay if the answer is wrong just let me know what do you think happens when you write copy and sorry for the delayed response
Before i explain that i need to explain a concept of binding and observer property wrappers because only then we will know when to use what otherwise its going to be a little challenging as to why am i using binding or observers
Hello Ravi, I have a tableview with 100 plus number of rows(dynamic data from api). Now when I get response from the api, shall I store all the 100 data in array because it will take unnecessary memory. Is there any optimised way?
Hello Priyanka, If your API supports pagination (top and skip) then rather than bringing 100 records from the API just request for top 30 records and then when the user scrolls down to the table view last row request the next 30 that way you can load the data a little quick. if your API does not have pagination then how you are doing it should be fine and is the preferred approach.
As per apple developer documentation notes the argument is if a lazy property is not yet initialized and multiple thread access the lazy property then there’s no guarantee that it will be initialized only once. You could end up with multiple instances of that object in the memory and hence its not thread safe. Sorry about not explaining this in the video and good catch Rajan thank you Link to dev doc: docs.swift.org/swift-book/LanguageGuide/Properties.html
Best video on lazy till I watch on CZcams, Finally I understand the concept properly. Thanks Ravi 🙏
One of the best channel for iOS development. Your teaching is unique you explain the things comparing to real world that is awesome, but if you can explain in English lot many members will watch your videos
Am glad this video was helpful Naresh, and welcome to the channel. I keep my videos in Hindi as lot of my audience wants me to keep it in Hindi but I do try my best to add captions in the video whenever I can buddy and once again thank you for your kind words
i was also confused but you did very good job be showing the difference with practical example
No problem am glad i was able to help and clear your doubts 😊
Hey Ravi, I am new to this channel but I have watched your most of videos in few days only and it was very helpful for me. I am very confused with the Provising Profiles like which certificate is used for which purpose. Can you make a video on that?
Hello Shubhangi, welcome to the channel and I am glad you found most of these videos helpful and worth your time. I will surely try to make a video on the provisioning profiles and their usage. Please do share this channel with your iOS developer friends or even beginners who are learning iOS development and swift programming on what's app or Facebook
wow very helpful..perfect example . thanks master Sahb
Thank you 👍
Very well explained Ravi, now I got to know the actual difference between lazy and computed property. Could you please make a video on multithreading and how to make thread-safe properties .
more will be explained in a video than this comment but usually if you want something to just wait till you kick off another task I usually use serial queues, however I want to know if you are referring to a use case where two threads are trying to access a single resource? or something else because literally there are so many use case which I can think of here just want to get a use case similar to what you have in mind and maybe add two or three more examples to it.
Code Cat Yes Ravi, I would like to know that same time multiple thread accessing same resource.For example we are downloading multiple images and we want to pause , cancel without freezing UI. such kind of events by using operations and operation queues. If you can make video it . It would be more helpful for me . Because the way you explain. It’s hits me quickly with your examples 😊😊
Good Explanation , Happy to watch your videos
Thank you so much 🙂, please feel free to ask questions and do share the channel with your iOS group
Well explain ravi.. Keep on uploading great content 🔥
Thank you, plz do ask questions on this topic and do share it with your iOS group
explaination at peak.. Thanks..
Thanks Shahbaz
good video. What are the real time examples for lazy keyword usage?
I want to start a job as ios developer plz give me some guidence . I learn swift documentation only its enough for beginner level
This is a broader discussion but I did write a blog on this on medium, here’s the link for the same I hope it helps
medium.com/swlh/how-to-start-your-journey-as-an-ios-developer-a23b835b1fed
If the site does not open, please try the above in incognito mode
Thank you for this great knowledge
Well explained 👍
Hello Payal, welcome to the channel. I am glad this video was helpful to you. Plz do feel free to ask questions on this topic and do share the video with your iOS group on WhatsApp or Facebook 😊
Hello Ravi , thanks for amazing video.
I tried to use Lazy ,
but when I try to use with "let" , compiler give me error "lazy can not be used on let"
because in lazy variable as we saw , we can set value only once (unable to get updated value 100 when we set it ComplexTask.firstElement == 100) , so why "let" is not allowed ?
also why static property and function , in this ComplexTask class ? is it related to lazy var or just demo purpose.
and what will be best practice to use static variable or instance variable.
Waiting for your next video 🙂
Am on vacation as of now so didn’t post any video this Sunday, will post this week 😊
Enjoy🤘
Thank you Priyanka
Thanks,
what is object mapping in swift
will u create a detailed video on this topic
Object mapping is where you assign value from object a to a similar property in object b. There are various ways to achieve this but the one way i can tell you is the decodable protocol where swift does mapping of our json object to our swift models. I have few examples in the api series where am explaining this in detail
Link: czcams.com/video/RiuvxmoU37E/video.html
@@CodeCat15 thanks
lazy memory sy kab remove hota ha?
suppose lazy assing and object of class is remove lazy will remove from memory ?
second thiing suppose strong variable we created
so object is not created will the veriable exist in memory or not
Its same like other objects agar koi strong reference aapne create nahi kiya hai to use case mai swift ARC aapke lazy object ko memory se clear kar dega. Class deallocate jab hoga tab aapka lazy object bhi memory se clear ho jayega.
Maine ARC aur strong reference behavior ARC k video mai explain kiya hai aap usse check kare ARC k is behavior ko detail mai jaan k liye
Link: czcams.com/video/XAlXnApplk0/video.html
Brother do u have any video on access control in swift.?
Why is it not safe for multi threading.
From the Swift programming documentation: If a property marked with the lazy modifier is accessed by multiple threads simultaneously and the property hasn’t yet been initialized, there’s no guarantee that the property will be initialized only once.
Source: docs.swift.org/swift-book/LanguageGuide/Properties.html
In case of copy , will the retain count increase by 1 for the original one?
what do you think Priyanka? let's hear that out first and it's okay if the answer is wrong just let me know what do you think happens when you write copy and sorry for the delayed response
👍👍
Welcome to the channel Deepika, please do ask questions on this topic and do share the channel with your iOS group on WhatsApp or Facebook
Please make a tutorial on combine framework using storyboard view controllers pasing data one to one and one many .
Ravi bro ..???
Before i explain that i need to explain a concept of binding and observer property wrappers because only then we will know when to use what otherwise its going to be a little challenging as to why am i using binding or observers
@@CodeCat15 ok sir I will wait
@@CodeCat15 wese jahan tk mujh yad he ap property observer p pehly b tutorial bna chuke , will set and didset .
oh i just checked property observer and observer property both are different..
What is the meaning of "Lazy is not thread safe"?
Hello Ravi,
I have a tableview with 100 plus number of rows(dynamic data from api). Now when I get response from the api, shall I store all the 100 data in array because it will take unnecessary memory. Is there any optimised way?
Hello Priyanka, If your API supports pagination (top and skip) then rather than bringing 100 records from the API just request for top 30 records and then when the user scrolls down to the table view last row request the next 30 that way you can load the data a little quick. if your API does not have pagination then how you are doing it should be fine and is the preferred approach.
Thanks for responding. My api is not supporting pagination.
@@dipikasahu3298 okay cool then, how you are doing it should be fine, are you facing issues with your current implementation?
No, just wanted to confirm the correct way.
Cool, so was i able to answer your question? If not please do ask
You should have given example why lazy is not thread-safe
As per apple developer documentation notes the argument is if a lazy property is not yet initialized and multiple thread access the lazy property then there’s no guarantee that it will be initialized only once. You could end up with multiple instances of that object in the memory and hence its not thread safe.
Sorry about not explaining this in the video and good catch Rajan thank you
Link to dev doc: docs.swift.org/swift-book/LanguageGuide/Properties.html