Posted By


flyingmachine on 04/07/09

Tagged


Statistics


Viewed 58 times
Favorited by 0 user(s)

picker valueInSeconds


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.