Quindi l'ho risolto - il mio problema era che non sapevo come fare correttamente i matematici con i nsnumbers - non sapevo che lo stavo cercando, ecco perché non lo chiedevo. Ecco il codice che mi è venuto in mente per calcolare la lunghezza di un album sul tuo dispositivo:
- (void)fullAlbumLength
{
for (int i=0; i < songsAlbumList.count; i++)
{
if (addLength == NULL) // addLength and addLengthNew are NSNumber variables
{
addLength = [[self.albumTracksList objectAtIndex:i] valueForProperty: @"playbackDuration"];
}
else
{
addLengthNew = [[self.albumTracksList objectAtIndex:i] valueForProperty: @"playbackDuration"];
addLength = [NSNumber numberWithFloat:([addLength floatValue] + [addLengthNew floatValue])];
}
}
fullminutes = floor([addLength floatValue] / 60); // fullminutes is an int
fullseconds = trunc([addLength floatValue] - fullminutes * 60); // fullseconds is an int
fullLength.text = [NSString stringWithFormat:@"%02d:%02d", fullminutes, fullseconds];
}
Spero che questo sia utile per qualcun altro là fuori.