例如:
GizDeviceSchedulerCenter.delegate = self; NSArray *timers = [GizDeviceSchedulerCenter getSchedulerListGateway:gateway]; GizDeviceSchedulerSuper *timer = timers.firstObject;
NSLog(@"time %@, date %@, type %zd", timer.time, timer.date, timer.schedulerType); // 打印 time 14:34, date 2018-04-27, type 1
[timer setDate"2018-04-28"]; [timer setTime"15:00"]; NSLog(@"time %@, date %@, type %zd", timer.time, timer.date, timer.schedulerType); // 打印 time 14:34, date 2018-04-27, type 1
在进行了 setDate 与 setTime 的修改之后,timer 的 date、time 属性并无变化,不利于 App 的编写。
|