I am trying to create a functionality in my app in which the user can "drag and drop" to change the order of the trimmed videos which are already inserted into the an AVMutableComposition track.
I can retrieve the NSArray containing each segment of the track by using the "segments" property, copied this array into another array, made necessary changes to the new array and but cannot assign the new array into the segments array of the AVMutableComposition track.
Any ideas how can I do it?
Any help will be appreciated.
//retrieving the segments array
NSMutableArray *compTracksArr = [[NSMutableArray alloc] initWithArray:compTrack.segments];
//making changes to the order
[compTracksArr replaceObjectAtIndex:0 withObject:[compTracksArr lastObject]];
//assigning changed array to segments array
compTrack.segments = [NSArray arrayWithArray:compTracksArr];
But when I try to get the output by NSLog(), compTrack.segments do not show any changes in its order of components.