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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:18:05+00:00 2026-05-27T20:18:05+00:00

I have an App where it displays a UIImagePickerController on launch. The controller displays

  • 0

I have an App where it displays a UIImagePickerController on launch. The controller displays the cancel button, but there is nothing to cancel to. Is there any way to remove the button?

NOTE: This is not a duplicate of Can the Cancel button be removed from a UIImagePickerController in OS 3.2?. The answer there for iOS 3.2 does not work for me in iOS 5.

  • 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-27T20:18:06+00:00Added an answer on May 27, 2026 at 8:18 pm

    I try to put UIImagePickerController not modally, but in original way (as we do it with ordinary custom UIViewController). So, I need no the cancel button in the UINavigationBar.

    There are no documented ways to remove the cancel button. But here I found some idea.
    I just added this code in my AppDelegate.m file:

    - (void)navigationController:(UINavigationController *)navigationController
    willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
        for (UINavigationItem *item in navigationController.navigationBar.subviews) {
            if ([[item title] compare:@"Cancel"] == 0) {
                UIButton *button = (UIButton *)item;
                [button setHidden:YES];
            }
        }
    }
    

    So the cancel button is hidden now. But if you pick some folder in you photo albums the next view will be with that button (and it is not hidden).
    Then I tried to add code like this:

    - (void)navigationController:(UINavigationController *)navigationController
    didShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
        for (UINavigationItem *item in navigationController.navigationBar.subviews) {
            if ([[item title] compare:@"Cancel"] == 0) {
                UIButton *button = (UIButton *)item;
                [button setHidden:YES];
            }
        }
    }
    

    I get the cancel button is hidden in all navigation stack inside UIImagePickerController’s navigation.

    But while the new view is appearing (animation transition) the cancel button is appearing too.

    I don’t know how to fix this problem.


    However I think that it is a tricky and inefficient approach. Because it can break your application in the future iOS updates. So you can use the answer to that question. But it is different approach at all.

    P.S. Sorry for my language.

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

Sidebar

Related Questions

I have an app where I display the photo chooser (UIImagePickerController) but after the
I have an iPhone app that displays a modal view controller. The modal view
I have a Facebook app that displays content without requiring any authorization from the
I have a Flash web app which displays user submitted PNG files. Files are
I have an app using a ListView as a main screen. Each row displays
I have a Rails app with some basic models. The website displays data retrieved
I have a test winforms app with ThreadExceptionHandler that displays a message box when
I have a console app that needs to display the state of items, but
I have an app that displays a video using VideoView. The layout consists of
I have an app which displays a large amount of text for the user

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.