标签:
重写setter方法,对这个属性加上限制可优化代码,如客户人群age 在 18-35岁。
重写getter方法,可改变需要的格式传出,如数据获得的时间戳或着字符串,可以通过dateWithTimeIntervalSince:,setDateFormatter:@"yyyy-MM-dd mm:ss" ,stringFromDate获得需要的时间格式
setter方法 和 getter方法
原文地址:http://www.cnblogs.com/xiaomaisgs/p/5424282.html