properties - Why to use @property in iOS app development -
this question has answer here:
i searched on internet @property in ios , got answers such no need explicitly use setter , getter method. beside these answer can u explain me exact benefit of using @propert in ios app development.
what benefit , when use?
thank you.
basics of oop(object oriented programming) - hide ivars / properties outside world.
@property
specific objective-c, creates ivars , given option either use compiler defined setter & getter, or create own @synthesize
.
few differences still valid objective-c , other oop languages ivars/properties private/protected/public. there ways set access-specifiers.
if fancied ivars , properties 1 of major advantage of kvo (key value observer) helps minimize codes , self.property
name suffice.
Comments
Post a Comment