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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:53:55+00:00 2026-06-12T22:53:55+00:00

I’m new to Xcode development, and I’d like to develop a slide-up menu triggered

  • 0

I’m new to Xcode development, and I’d like to develop a slide-up menu triggered from a UIToolbar in my iPhone app.

What I’m looking at is creating a subview with menu buttons, adding it to the main view, and sliding it up(visible) or down(hidden) when the toggle button is tapped.

How do I do this programmatically?! The Opera app for iPhone does this well (see the picture).

opera-app

  • 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-12T22:54:00+00:00Added an answer on June 12, 2026 at 10:54 pm

    What you are saying can be done by code by adding a subview to your mainview and slide it up and down to make it visible and unvisible.

    1) Add a subview to far y coordinate so that initially its not visible in the view.

    subView  =  [[UIView alloc]initWithFrame:CGRectMake(0,470,320,200)]]; // subView is an ivar
    // Add stuffs to your subview
    [self.view addSubview:subView];
    

    2) Now make two IBActions showMySubview and hideMySubview and link them to the corresponding buttons or you can do some toggling with one button by checking its label.text.

    3) In your showMySubview

            [UIView beginAnimations:nil context:nil];
            [UIView setAnimationDuration:1.5];
            [UIView setAnimationDelay:0.0];
            subView.frame = CGRectMake(0, 50, 320, 200);
            [UIView commitAnimations];
    

    4) In your hideMySubview

            [UIView beginAnimations:nil context:nil];
            [UIView setAnimationDuration:1.5];
            [UIView setAnimationDelay:0.0];
            editPopUpView.frame = CGRectMake(0, 470, 320, 200);
            [UIView commitAnimations];
    

    You can also do some beautify things to your subview to look some good add QuartzCore framework to your project and import it in your .m file and add these lines after adding your subview to your mainview the import is #import “QuartzCore/QuartzCore.h”

    [[subView layer] setCornerRadius:12.0f];
    [[subView layer] setMasksToBounds:YES];
    [[subView layer] setBorderWidth:4.0f];
    [subView layer].borderColor =   [UIColor purpleColor].CGColor;
    

    Hope This will help you in anyways 🙂

    EDIT :

    Adding buttons via code to your subview :

    for (int i = 0; i < 3; i++) {
    
        for (int j = 0; j < 3; j++) {
    
            UIButton *btn   =   [UIButton buttonWithType:UIButtonTypeCustom];
            btn.frame       =   CGRectMake(j*60,200+ 35 * i ,50 , 30);
            //[btn setTitle:@"Test" forState:UIControlStateNormal];
            [btn setBackgroundImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal];
            [btn setBackgroundImage:[UIImage imageNamed:@"selected.png"] forState:UIControlStateHighlighted];
            btn.tag =   (j + 1) + (3 * i);
            [btn addTarget:self action:@selector(subViewButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
            btn.showsTouchWhenHighlighted   =   YES;
            [subView addSubview:btn]; // its the subview we added to our main view add this after initializing the subview
    
        }
    }
    

    Now a function to catch the clicks of all the buttons

    -(IBAction)subViewButtonClicked:(id)sender
    {
        switch ([sender tag]) {
        case 1:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
    
        case 2:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
        case 3:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
        case 4:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
        case 5:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
    
        case 6:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
        case 7:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
        case 8:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
    
        case 9:
        {
            // Do your stuff here
    
             NSLog(@"the tag of sender is %i",[sender tag]);
    
            break;
        }
        default:
            break;
    }
    
    }
    

    There may be many easy ways out there but hope this will get you a start 🙂

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.