ios - The background music keep restarting. How to stop it. -


i create sharedinstance of background music , initialize in viewdidload of first view controller. when change screen (via segue) , come first screen, music restart. believe that's happen because viewdidload it's called again, don't want music keep restarting every time comeback screen.

how can manage music keep playing without interfering?

try starting background music in appdelegate , not having tied particular view controller.

although should typically avoid putting code in appdelegate, starting/initializing services start-up task, , makes sense there.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -