摘要: 在OC中,设值方法(setter)和取值方法(getter)统称为访问器方法(accessor)。 1.设值方法:设置实例变量值的方法通常称为设置方法;比如: -(void)setNumerator:(int) n { numerator=n; } 主要目的:将方法参数设为对应的实力变量的值,不需要 阅读全文
posted @ 2017-07-10 16:24 飞走失恋 阅读(278) 评论(0) 推荐(0) 编辑