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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:05:51+00:00 2026-06-04T14:05:51+00:00

I am having back button and edit button on my navigation bar like below

  • 0

I am having back button and edit button on my navigation bar like below
enter image description here

After clicking on the Edit button, I have

enter image description here

My question : how can I disable click on back button when I am in edit mode so that user can not go back previous screen until he or she is done…..

What I am trying is

self.navigationItem.backBarButtonItem.enabled   =   NO;

but the back button is still clickable

PS : The way I add back button to navigation bar is

self.navigationItem.hidesBackButton             =   NO;

I can hide back button but I dont want that option…

Please advice me on this issue. Any comments are welcomed here.

  • 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-04T14:05:52+00:00Added an answer on June 4, 2026 at 2:05 pm

    The best solution would be to end edit mode when you are leaving the screen, maybe displaying a confirmation alert first (UIAlertView with two buttons “Ok” and “Cancel”).

    However, to answer the question – you would have to create a UIButton with the same appearance as a back button (using images). Create a UIBarButtonItem with this button as its custom view and use it in leftBarButtonItem (note that backBarButtonItem cannot have custom views).

    Then you would be able to set enabled to NO on that custom view.

    EDIT: I was wrong. UIBarButtonItem has enabled property. The problem with disabling the back button was there probably because you were disabling backBarButtonItem on the wrong navigationItem. The back button is always defined by the previous controller in the stack.

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

Sidebar

Related Questions

I'm having trouble setting a custom back button. Below is the current code I'm
On the back of my previous question I am having some trouble with the
I am having trouble writing and reading back special characters like the Euro-sign (€)
After having worked in MVC for a few months, I'm back in a previously
I am having trouble with a navigation menu I have created. Basically, the navigation
I'm having some issues with maintaining scroll bar locations. The Background I have a
I am having trouble clicking or interacting with some page elements. They seem like
I'm suddenly back to WinForms, after years of web development, and am having trouble
I'm having a problem when trying to pass an array back to a COM
I am having a weird problem with sending data back to my server. 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.