The progress bar of Netease cloud music and Netease cloud music
Playing progress bars of Netease cloud music have three statuses: Playing, pausing, and dragging. They only implement the animation and main interaction logic, and other details (such as pausing music) you also need to complete it yourself:
DKPlayerBarIs inherited fromUIControlIf you want to obtain the playback or pause events, we recommend that you use the standardAddTargetMethod:
[PlayerBar addTarget: self action: @ selector (playOrPause) forControlEvents: UIControlEventValueChanged];
ThenDKPlayerBarListen inDKPlayButtonOfUIControlEventTouchUpInsideEvent:
[PlayButton addTarget: self action: @ selector (playOrPause) forControlEvents: UIControlEventTouchUpInside];
Finally, the event is passed out.
CSDN
PS:
If you want to implement a pair of Netease cloud musicControl CenterThe effect is as follows:
You can see here