[英]EKAlarm Retrieving in iPhone sdk
Now i am working on calendar
application that uses EKAlarm
.I successfully save alarm time to EKEvent.When I retrieve alarm array i got like this in console 现在我正在使用EKAlarm
calendar
应用程序上工作。我成功将警报时间保存到EKEvent。当我检索警报数组时,我在控制台中得到了这样的信息
("EKAlarm <0x10d110b0> {triggerInterval = -86400.000000}")
.I want to get 86400
from this array.How this possible?Please help me.Thanks in advance 。我想获得86400
从这个array.How这可能吗?请帮me.Thanks提前
first of all import math library like #import<math.h>
首先导入数学库,例如#import<math.h>
then NSLog(@"the round is %d",abs(-86400.000000));
然后NSLog(@"the round is %d",abs(-86400.000000));
you can pass your objectatindex as a parameter to abs function. 您可以将objectatindex作为参数传递给abs函数。
EKAlarm *alerm=[[[remindArray objectAtIndex:indexPath.row]alarms]objectAtIndex:0] ;
float triggerInterval =[alerm relativeOffset];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.