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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:28:08+00:00 2026-05-23T08:28:08+00:00

My modal view controllers are being shown behind my UIActionSheet, and my UIActionSheet is

  • 0

My modal view controllers are being shown behind my UIActionSheet, and my UIActionSheet is not getting dismissed. I am using:

[self presentModalViewController:composeTweetView animated:YES];

To present my modal view controller.

My action sheet is being shown from the tabBar:

[actionSheet showFromTabBar:self.parentViewController.tabBarController.tabBar];

This code worked on iOS 4.0.

if (buttonIndex == 0) {
        if (self.isLoggedIn) {
            [FlurryAPI logEvent:@"ST_REPLY_CLICKED"];
            composeTweetView.isDirectMessage = FALSE;
            [self presentModalViewController:composeTweetView animated:YES];
            [composeTweetView release];
        }
        else {
            LoginViewController* loginView = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
            loginView.delegate = self;
            loginView.isPostingComment = TRUE;
            self.isReply = TRUE;
            [self presentModalViewController:loginView animated:YES];
            [loginView release];
            [composeTweetView release];
        }
    }

Summary:

I have a UIViewController that contains a UITabBar. I am presenting a UIActionSheet which has a few buttons that present a modal view controller. When the modal view controller is presented, the UIActionSheet should dismiss itself and the modal view should be on the top of the stack. The problem is, the UIActionSheet does not dismiss, and the modal view is loaded behind it. This problem did not occur up until iOS 4.2.1

Steps to Reproduce:

  1. Create a TabBar project, setting
    your Base SDK to iOS 4.2.1
  2. Create a button or trigger to show a UIActionSheet
  3. Allow one of the buttons in the UIActionSheet to present a modal view controller using the syntax: [actionSheet showFromTabBar:self.parentViewController.tabBarController.tabBar];

Expected Results:

1. The UIActionSheet should dismiss itself, and the modal view should appear in front

Actual Results:

1. The UIActionSheet does not get dismissed and the modal view appears behind it.

Regression:

This problem was not apparent prior to iOS 4.2.1

Notes:
I have tried other ways of displaying the UIActionSheet all of which don’t work as intended:

//[actionSheet showInView:self.parentViewController.tabBarController.tabBar];
//[actionSheet showInView:[self.view window]];
//[actionSheet showInView:self.parentViewController.tabBarController.view];
//[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
  • 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-23T08:28:08+00:00Added an answer on May 23, 2026 at 8:28 am

    The problem has been resolved in iOS5.

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

Sidebar

Related Questions

I am displaying a modal view with [self presentModalViewController:controller animated:YES]; When the view moves
I am having trouble getting my modal view controllers to display properly. I have
What prevents a modal view controller from being dismissed? I've found dismissModalViewControllerAnimated doesn't always
here the following code is used to view the present modal view controller. [[self
I'm trying to present a modal view controller after selecting a contact and it
I am trying to present a modal view controller. I have read the documentation,
Is it just me or is MVC really Model-View/Controller-View View-Model/Controller-Model with two distinct controllers?
What's the pros and cons of using a Model-View-Controller model in building your application?
I'm looking for patterns and principles for using with WPF and NHibernate in model-view-controller
I have a ViewController which I'm using a modal transition for. It has a

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.