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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:50:39+00:00 2026-05-23T04:50:39+00:00

I had used the below mention code for a custom left pointed back button

  • 0

I had used the below mention code for a custom left pointed back button and it was working properly..
but after a few days, it changed back to a rectangular button..
can anyone help me to get it back to its original type….
Thanks…

UIButton *backButton = [UIButton buttonWithType:101];
[backButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
[backButton setTitle:@"Back" forState:UIControlStateNormal];

UIBarButtonItem* newBackButton = [[UIBarButtonItem alloc] initWithCustomView:backButton];
graphSecondViewCtrl.navigationItem.leftBarButtonItem = newBackButton;
  • 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-23T04:50:39+00:00Added an answer on May 23, 2026 at 4:50 am

    Button type 101 is not defined in the SDK, and can stop working at any OS upgrade.

    I’d use a buttonWithType:UIButtonTypeCustom and then add an image that gives you the look you need by calling setImage:forState on the custom button object.

    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [backButton setImage:[UIImage imageNamed:@"backBarButtonNormal.png"] forState:UIControlStateNormal];
    [backButton setImage:[UIImage imageNamed:@"backBarButtonHighlighted.png"] forState:UIControlStateHighlighted];
    
    // Rest of the code is the same.
    

    The real question is why you’d need to recreate the standard button that the navigation controller automatically gives you in the first place. Make sure you work with the tools, and not against them.

    If you need to track when the view controller gets swapped in and out, you can set your view controller to be the delegate of the navigation controller like this:

    - (void)viewDidLoad {
        [super viewDidLoad];
        [[self navigationController] setDelegate:self];
    }
    
    - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
        if (viewController != self)
            NSLog(@"We're going away...");
    }
    
    - (void)viewDidUnload {
        [super viewDidUnload];
        [[self navigationController] setDelegate:nil];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had used the below code to get the row index of the UIPickerView
I want to get zip code from users current location(Latitude, Longitude), I had used
I used this code in my users views and had no trouble: <% if
The code below looked ok to me when I wrote it, but when I
I used below code: var data = from query in loadedData.Descendants(chapter) select new CountryData
I want to insert images into my SDCard.So I used below code m_cImagePath =
All, Have used this site a few times before and had some great replies
I have first encounter operator overloading in .Net, long back I had used it
I had used several ways to do some simple integer arithmetic in BASH (3.2).
Feeling I had not enough control over the chart if I had used 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.