Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7619955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:49:13+00:00 2026-05-31T03:49:13+00:00

In my app, every time a user switches to a new view a sound

  • 0

In my app, every time a user switches to a new view a sound will be played. Also, every time a button is tapped, a sound will be played.

The sounds to be played are the same for each case, so for example, sound.caf will be used many times and will be the same for every view.

My problem is that I cant think of a clever place to alloc these sounds, thats visible to all views. Is this possible? I dont want to alloc the sound everytime a view is created because I think it’s a waste of time.

Is there someplace where I can alloc these sounds, and play them from any view in my program? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:49:14+00:00Added an answer on May 31, 2026 at 3:49 am

    The simplest solution would probably be to use the app delegate for that purpose because it’s a singleton class (there is only one instance of it per application) and it can be accessed by any class easily: [UIApplication sharedApplication].delegate

    You could set up the sound(s) in the applicationDidFinishLaunching: method so they’re ready to go when your app is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# WPF app that every time the user opens a new
My GitHub app seems to be adding new SSH keys to github every time
The app will run fine, then crash - literally every other time. It seems
My Servlet app. gets called twice every time the user submits a form: The
For some reason, every time a user clicks the download button while on 3g
My app generates 3 files every time the user saves a project. I would
we have a facebook app and every time a user invites a friend the
My app successfully creates rows for a table every time a user submits some
In my app I create temp dirs every time user commits a certain action.
In my app I have a Linked List (type List), every time the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.