We Recommend

Programming in Objective-C Programming in Objective-C
Programming in Objective-C is a concise, carefully written tutorial on the basics of Objective-C and object-oriented programming. The book makes no assumption about prior experience with object-oriented programming languages or with the C language (upon which Objective-C is based). And because of this, both novice and experienced programmers alike can use this book to quickly and effectively learn the fundamentals of Objective-C.


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.