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 8140181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:04:32+00:00 2026-06-06T12:04:32+00:00

How this UIButton rewind can send notification to UIButton play to perform playpauseaction method

  • 0

How this UIButton rewind can send notification to UIButton play to perform playpauseaction method when rewind button is clicked.

-(void)rewind:(id)sender{
[timer invalidate]; 
audioPlayer.currentTime = 0;
MainViewController *viewController = [[MainViewController alloc] init];
viewController.view.frame = CGRectMake(0, 0, 320, 480);
[self.view addSubview:viewController.view];
[self.view addSubview:toolbar];
[viewController release];
} 

 -(void)playpauseAction:(id)sender {    
if([audioPlayer isPlaying])
{
    [sender setImage:[UIImage imageNamed:@"Play Icon.png"] forState:UIControlStateSelected];
    [audioPlayer pause];
    [self pauseTimer];
    [self pauseLayer:self.view.layer];
}
else
{
    [sender setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateNormal];
    [audioPlayer play];
    [self resumeTimer];
    [self resumeLayer:self.view.layer];

    if(isFirstTime == YES)
    {
        self.timer = [NSTimer scheduledTimerWithTimeInterval:11.0
                                                      target:self
                                                    selector:@selector(displayviewsAction:)
                                                    userInfo:nil
                                                     repeats:NO];
        isFirstTime = NO;
    }
    }
    }

rewind button when clicks perform rewind method and as well send notification to play button to perform playpauseAction method.

Thanks for help.

EDIT
Have declared

    @property (nonatomic, retain) UIButton *playButton;
    @synthesize playButton = _playButton; 
   [self playpauseAction:_playButton];

what happening is when clicking on rewind button it performing play pause action method but not toggling play button to pause as per playpauseaction method. why is that

  • 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-06-06T12:04:33+00:00Added an answer on June 6, 2026 at 12:04 pm

    If you have a reference to your play pause button (which you will want to have to make this kind of thing a ton easier), you can just write this line in your rewind method

    [self playpauseAction:playpauseButton];
    

    You don’t need to use the notification center at all

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

Sidebar

Related Questions

Is this right way to handle memory? Method 1: with no crash UIButton *button
I am creating a button like this inside a method: UIButton * btn =
I am using this code to launch google map fine. -(void)buttonPressed:(UIButton *)sender{ NSString *urlstring=[NSString
Basically I have a custom UIButton and this custom button contains subviews. If I
In a UIViewController's viewDidLoad method, I do this: UIButton *b = [[UIButton buttonWithType:UIButtonTypeRoundedRect] initWithFrame:CGRectMake(0,
How can I get a UIButton like the ones at the bottom of this
I want to make my UIButton look like this: How can I achieve this
I have a UIButton in my UITableViewCell . This button launches a UIActionSheet so
Suppose I have a method like this - (UIButton *) createButtonAtX:(CGFloat)vX Y:(CGFloat)vY{ //... bla
UIButton has a single initializer buttonWithType . But this is a factory method and

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.