myrectgle is an object. myrectgle.origin =xxx sets myrectgle.origin through the dot method. If you use @property when declaring origin, the compiler will automatically generate a - (void)setOrigin:(XYPoint *)pt method; if you write it again in the m file - (void)setOrigin:(XYPoint *)pt is equivalent to repeating After writing this method, setting the origin through the dot method will call this method;
myrectgle is an object. myrectgle.origin =xxx sets myrectgle.origin through the dot method. If you use @property when declaring origin, the compiler will automatically generate a - (void)setOrigin:(XYPoint *)pt method; if you write it again in the m file - (void)setOrigin:(XYPoint *)pt is equivalent to repeating After writing this method, setting the origin through the dot method will call this method;