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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:00:16+00:00 2026-05-26T15:00:16+00:00

How can I make my UINavigationController display a prompt when a button is pressed?

  • 0

How can I make my UINavigationController display a prompt when a button is pressed? I have already set my text by [[[self navigationController]navigationItem]setPrompt:[NSString stringWithFormat:@"Prompt is working!"]];

EDIT:
To clarify, I have a button calling an IBActionthat sets the prompt as follows but I need to find a way to display the prompt as soon as that button is pressed:

-(IBAction)test:(id)sender
{
    [[[self navigationController]navigationItem]setPrompt:[NSString stringWithFormat:@"Prompt works!"]];
    //I want it to display right after I set it, so I'm missing something and can't figure it out through the documentation
}

I have already tried [[[self navigationController]navigationBar]pushNavigationItem:nav animated:YES]; but that throws an error stating Cannot call pushNavigationItem:animated: directly on a UINavigationBar managed by a controller.

  • 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-26T15:00:16+00:00Added an answer on May 26, 2026 at 3:00 pm

    You should set the prompt text like this:

    self.navigationItem.prompt = @"This is the title";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can make Firefox not display the ugly dotted focus outlines on links with
Can someone tell me how I can make the following output? I have a
I have a application that make use of a UINavigationController. In the rootview I
I can make a query that returns a result set of nodes with their
I can make the text fit inside the div? <div> Hello! This a long
Is there any way to make the default navigation bar of an UINavigationController display
i'm using a QR Code SDK when pressed the button, it will have a
We can make all elements of class 'button' as JQuery UI Buttons using the
Can you can make an info path attachment control mandatory based on a set
I can make a DAO recordset in VB6/Access do anything - add data, clean

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.