objective c - How to drag and drop mp3 songs in the playlist -
i developing mac desktop based application, created playlists using nsoutlineview
. know how drag , drop in nstableview
, don't know how drag , drop in playlists according attached image(like itunes application) ,i dragging songs in playlist 2.
at time of selecting songs nstableview, store selected songs id in array. after when mouse reach in nsoutlineview following delegate methods call time user can add playlist table...
-(nsdragoperation)outlineview:(nsoutlineview *)outlineview validatedrop:(id)info proposeditem:(id)item proposedchildindex:(nsinteger)index
{
return yes;
}
and
- (bool)outlineview:(nsoutlineview *)ov acceptdrop:(id )info item:(id)item childindex:(nsinteger)childindex
{
retuen yes;
}
Comments
Post a Comment