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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:42:37+00:00 2026-05-18T02:42:37+00:00

I have a short audio clip that plays when a button is pressed. I

  • 0

I have a short audio clip that plays when a button is pressed. I want to create a slide-up controller from the bottom that contains a pause/play button and a slider bar displaying the length of the audio. I also want the view behind the controller to remain scrollable while the controller is visible. I believe this excludes using a UIAlertView or UIActionSheetView as both cause the view below to remain static. What is the best way to implement this?

EDIT: i found a helpful tutorial here: http://iosdevelopertips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html

and I was able to modify this to get something of what I want. However, if I would like to animate using a nib file where/how would i call this?

#import "SlidingMessageController.h"


@interface SlidingMessageController(private)
- (void)hideMsg;
@end

@implementation SlidingMessageController
#pragma mark -
#pragma mark Private Methods


- (void)hideMsg;
{
    // Slide the view off screen
    CGRect frame = self.frame;

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:.75];

    frame.origin.y = 480;
    frame.origin.x = 0;
    self.frame = frame;

    //to autorelease the Msg, define stop selector
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];

    [UIView commitAnimations];
}

- (void)animationDidStop:(NSString*)animationID finished:(BOOL)finished context:(void *)context 
{
    [self removeFromSuperview];
    [self release];
}

#pragma mark -
#pragma mark Initialization

- (id)initWithDirection:(int)dir;
//- (id)initWithTitle:(NSString *)title message:(NSString *)msg
{
  if (self = [super init]) 
  {
      //Switch direction based on slideDirection konstant
      switch (dir) {
          case kSlideUp:    //slideup
              // Notice the view y coordinate is offscreen (480)
              // This hides the view

              // What should I be doing here if I want to get the nib file???       
              self.frame = CGRectMake(0,480,320, 90);
              [self setBackgroundColor:[UIColor blackColor]];
              [self setAlpha:.87];


              newY = 380;
              newX = 0;
              myDir = 0;
              break;
              default:
              break;
      }


  }

  return self;
}

#pragma mark -
#pragma mark Message Handling

- (void)showMsgWithDelay:(int)delay
{
//  UIView *view = self.view;
    CGRect frame = self.frame;
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:.75];

    // Slide up based on y axis
    // A better solution over a hard-coded value would be to
    // determine the size of the title and msg labels and 
    // set this value accordingly

    frame.origin.y = newY;
    frame.origin.x = newX;
    self.frame = frame;

    [UIView commitAnimations];

    // Hide the view after the requested delay
    [self performSelector:@selector(hideMsg) withObject:nil afterDelay:delay];

}

#pragma mark -
#pragma mark Cleanup

- (void)dealloc 
{
  if ([self superview])
    [self removeFromSuperview];
  [super dealloc];
}

@end
  • 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-18T02:42:37+00:00Added an answer on May 18, 2026 at 2:42 am

    What do you mean with a “slide-up controller”? Just a view that slides up from the bottom? If so, you can just create a UIView with the buttons in it, and animate it. For the animation you can use UIView beginAnimations:context: and commitAnimations.

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

Sidebar

Related Questions

I have a short program that is used exclusively with a remote desktop connection
Does anybody have a short code sample that can be run in the VS
So I have about 10 short css files that I use with mvc app.
I have a bunch of short videos from my digital cam. i know how
I have an array of shorts (short[]) that I need to write out to
Have some audio and video files that users are to download, however depending on
I have a snippet to create a 'Like' button for our news site: <iframe
I have a need to convert audio samples from 11025 and 22050 to 44100;
I have an xml file that contains in products. File's structure this: <?xml version=1.0
I currently have code that reads a recording in from the devices mic using

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.