Re: [iPhone-AppDev-Auditors] question about the property setter method.

29 views
Skip to first unread message

Ming Lee

unread,
Jun 14, 2012, 9:43:43 PM6/14/12
to iphone-appd...@googlegroups.com
it call setter and getter method. self.scale += 1 equals to self.scale = self.scale + 1, so the right operation calls getter method, the left setter method.

On Thu, Jun 14, 2012 at 11:54 PM, Pan <mapa...@gmail.com> wrote:
Say i have a property called scale, then i implements its setter and getter method, then i write a statement like this:
self.scale += 1;
So, my question is: when i wrote this statement which change the value of the scale property, i think it calls its setter method automatically. Is my thinking right?
Thank you.

--
You received this message because you are subscribed to the Google Groups "iPhone Application Development Auditors" group.
To view this discussion on the web visit https://groups.google.com/d/msg/iphone-appdev-auditors/-/jrAz0u4wP54J.
To post to this group, send email to iphone-appd...@googlegroups.com.
To unsubscribe from this group, send email to iphone-appdev-aud...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphone-appdev-auditors?hl=en.

Pan

unread,
Jun 18, 2012, 11:19:26 PM6/18/12
to iphone-appd...@googlegroups.com
Got it. Thank you very much.


On Friday, June 15, 2012 9:43:43 AM UTC+8, lam wrote:
it call setter and getter method. self.scale += 1 equals to self.scale = self.scale + 1, so the right operation calls getter method, the left setter method.

On Thu, Jun 14, 2012 at 11:54 PM, Pan <mapa...@gmail.com> wrote:
Say i have a property called scale, then i implements its setter and getter method, then i write a statement like this:
self.scale += 1;
So, my question is: when i wrote this statement which change the value of the scale property, i think it calls its setter method automatically. Is my thinking right?
Thank you.

--
You received this message because you are subscribed to the Google Groups "iPhone Application Development Auditors" group.
To view this discussion on the web visit https://groups.google.com/d/msg/iphone-appdev-auditors/-/jrAz0u4wP54J.
To post to this group, send email to iphone-appdev-auditors@googlegroups.com.
To unsubscribe from this group, send email to iphone-appdev-auditors+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages