Posted By

flyingmachine on 04/07/09


Tagged


Versions (?)

picker valueInSeconds


 / Published in: Objective C
 

  1. - (NSInteger)valueInSeconds
  2. {
  3. NSInteger dayRow = [self selectedRowInComponent:0];
  4. NSInteger hourRow = [self selectedRowInComponent:1];
  5. NSInteger minuteRow = [self selectedRowInComponent:2];
  6. NSInteger daySeconds = dayRow * 24 * 60 * 60;
  7. NSInteger hourSeconds = hourRow * 60 * 60;
  8. NSInteger minuteSeconds = minuteRow * 5 * 60;
  9.  
  10. return (daySeconds + hourSeconds + minuteSeconds);
  11. }

Report this snippet  

You need to login to post a comment.