Does not start over from beginning
Closed this issue · 5 comments
Hi,
Thanks for the update, however, the problem remains same, when I use the following code, it still does not start over from the beginning of the lyrics,
lyricsView.timer.seek(toTime: 0)
lyricsView.timer.play()
It just resumes where it paused. Please help on this issue
Hi, coder-efay, please make sure that you are using the dependency of version 0.1.5, due to this version was just uploaded to the Cocoapods yesterday, you should update your pods cache via the command ‘pod update’ to update it to the latest and then run ‘pod install’. Meantime I’ll make a thorough check for my code, thanks for reply!
Hi, thanks for the response, however, the code still does not work after I did "pod update" and "pod install" . I saw your sources code that you only had the following change, which I do not think will fix the problem, because eplasedTime was not used.
Please check your code and run the app and try it again.
lyricsView.timer.seek(toTime: 0)
does not return to the beginning of the lyrics
Hi, coder-efay, it's weird, I've tested the latest dependency on the demo, everything works fine, may I disturb you to ask you few questions about the situation of your project?
- Do you call the
timer.pause()
function before you calling thetimer.seek(toTime)
function? - Do you manually call the function
scrollToTime
of the lyricsView? - Do you call any function which derives from
UITableView
orUIScrollView
to the lyricsView? - Do you re-assign the
timer
property of the lyricsView?
I am so appreciate to your cooperation and understanding!!
Thank you for answering, not sure what the problem was. however, the following code works this time as expected. Thanks again, this is a great library 👍 🥇
`
@IBAction func startButtonTapped(_ sender: Any) {
// Start it over
lyricsView.timer.seek(toTime: 0)
lyricsView.timer.play()
}
@IBAction func stopButtonTapped(_ sender: Any) {
/// Pause
lyricsView.timer.pause()
}
`
I am so pleasure to help you, If you have any question please let me know.