AVAudioPlayer, stop music on second view...

Discussion in 'iOS Development' started by hodgey87, Oct 5, 2010.

  1. hodgey87

    hodgey87 New Member

    Joined:
    Oct 21, 2007
    Messages:
    10
    Likes Received:
    0
    Hi everyone,

    I hope ive posted this in the right section

    Please Register or Log in to view images



    Im having some trouble with AVAudioPlayer, i have 2 views in my application and some background music that runs at the same time. I want to be able to stop the music on the second view only but not sure how to do it.

    Ive only been doing this for a few weeks so be easy on me

    Please Register or Log in to view images



    Cheers
  2. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
    Create a shared controller for that player and call it from each view.

    Lookup "singleton".
  3. hodgey87

    hodgey87 New Member

    Joined:
    Oct 21, 2007
    Messages:
    10
    Likes Received:
    0
    Cheers i got it sorted, i have no reference to the audio that was playing.

Share This Page