0

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

Bajaj
  • 859
  • 7
  • 17
IKKA
  • 6,297
  • 7
  • 50
  • 88

2 Answers2

0

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.

Agent Chocks.
  • 1,312
  • 8
  • 19
0
 EKAlarm *alerm=[[[remindArray objectAtIndex:indexPath.row]alarms]objectAtIndex:0] ;

 float triggerInterval =[alerm relativeOffset];
Harry
  • 87,580
  • 25
  • 202
  • 214