简体   繁体   中英

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 <0x10d110b0> {triggerInterval = -86400.000000}")

.I want to get 86400 from this array.How this possible?Please help me.Thanks in advance

first of all import math library like #import<math.h>

then NSLog(@"the round is %d",abs(-86400.000000));

you can pass your objectatindex as a parameter to abs function.

 EKAlarm *alerm=[[[remindArray objectAtIndex:indexPath.row]alarms]objectAtIndex:0] ;

 float triggerInterval =[alerm relativeOffset];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM