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

  • Home
  • SEARCH
  • 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 6572811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:03:12+00:00 2026-05-25T15:03:12+00:00

I have a Tab bar app with 3 view controller, the FirstViewController have an

  • 0

I have a Tab bar app with 3 view controller, the FirstViewController have an audio player with the list of song and play/pause button.
Now I want for SecondviewController and ThirdViewController to add a button who will call the method – (void) playpause of the FirstViewController class.

Looks easy but I didn´t find the way to make it working, i tried that :

  - (IBAction) playpause1
 {
PlayerAppDelegate *appDelegate = (PlayerAppDelegate*)[[UIApplication sharedApplication] delegate];
[appDelegate performSelector:@selector(playpause)];
NSLog(@"playpause test");   

}

But this code only control the method in app delegate, not directly on the FirstViewController class like I need.

Any tips ?

  • 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-25T15:03:13+00:00Added an answer on May 25, 2026 at 3:03 pm

    There are a number of possibilities:

    • Move the audio playing capability to a separate object, since it’s a distinct task from what a view controller normally does. Then give all three view controllers a reference to that audio player and let them use it as necessary.

    • Have the object that creates the view controllers (typically the app delegate) give the second and third view controllers each a reference to the first view controller and let them send the -playpause message.

    • Use notifications. The second and third view controllers can simply post a notification that the first controller will listen for. This avoids the need to have the three view controllers know about each other.

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

Sidebar

Related Questions

I have a tab-bar and navigation controller application (like Youtube app or Contacts app).
I have a tab bar application and when I display a modal view controller,
I have a tab bar application with a navigation controller and view controllers inside
I have tab bar controller in my app. It opens Quotes of the day
I have an app with a tab bar. Each tab has its own view
I have an app that uses a tab bar controller. It has five tabs.
I have 3 view controller in a tab bar controller. Clicking on any tab
I have a three view tab bar app the second view of which I
I have a tab bar driven app. The app has some view controllers that
In my app I have a tab bar. And in some views I as

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.