I am really a .NET developer with some knowledge of x-code and objective C. What I am doing is calling a .NET web service to get a collection of Songs. I get these songs from the .NET web service: Name (String), Duration(TimeSpan), Hours(Int), Minutes(Int), and Seconds(Int). I only added the Hours, Minutes, and Seconds because I could not find any data type in objective C that would mimic the TimeSpan.
Now what I have to do is as they select multiple songs I need to add the Time of each song for a total duration of songs added.
Currently in the Music.h file I am using an NSDateComponent to hold the Hours, Minutes, and Seconds. Now I assume I could pull each piece out and add them up, make the conversion to handle seconds running over a minute, and stuff the total into another NSDateComponent, but there has to be an easier way.
Please help me find that easier way.
Thanks
Now what I have to do is as they select multiple songs I need to add the Time of each song for a total duration of songs added.
Currently in the Music.h file I am using an NSDateComponent to hold the Hours, Minutes, and Seconds. Now I assume I could pull each piece out and add them up, make the conversion to handle seconds running over a minute, and stuff the total into another NSDateComponent, but there has to be an easier way.
Please help me find that easier way.
Thanks