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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:23:59+00:00 2026-06-18T05:23:59+00:00

How do I make UINavigationBar title to be user editable, I’ve tried setting the

  • 0

How do I make UINavigationBar title to be user editable, I’ve tried setting the titleView to be a textfield however it doesn’t look the same.. It’s missing that outline or drop shadow. I’m aiming for it to look like the default one.

This is what i’m implementing at the moment:

 _titleField = [[UITextField alloc]initWithFrame:CGRectMake(0, 0, 200, 26)];
[_titleField setDelegate:self];
_titleField.text = _bugDoc.data.title;
_titleField.font = [UIFont boldSystemFontOfSize:20];
_titleField.textColor = [UIColor whiteColor];
_titleField.textAlignment = NSTextAlignmentCenter;
self.navigationItem.titleView = _titleField;
  • 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-18T05:24:00+00:00Added an answer on June 18, 2026 at 5:24 am
    - (void)viewDidLoad
    {
        [super viewDidLoad];
        [self loadTitle];
    }
    - (void)loadTitle
    {
        txtField_navTitle = [[UITextField alloc] initWithFrame:CGRectMake(self.view.bounds.origin.x,7,self.view.bounds.size.width,31)];
        txtField_navTitle.delegate = self;
        [txtField_navTitle setBackgroundColor:[UIColor clearColor]];
        txtField_navTitle.textColor = [UIColor whiteColor];
        txtField_navTitle.textAlignment = UITextAlignmentCenter;
        txtField_navTitle.borderStyle = UITextBorderStyleNone;
        txtField_navTitle.font = [UIFont boldSystemFontOfSize:20];
        txtField_navTitle.autocorrectionType = UITextAutocorrectionTypeNo;
        txtField_navTitle.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
        [self.navigationItem setTitleView:txtField_navTitle];
        txtField_navTitle.layer.masksToBounds = NO;
        txtField_navTitle.layer.shadowColor = [UIColor whiteColor].CGColor;
        txtField_navTitle.layer.shadowOpacity = 0;
        [txtField_navTitle release];
    }
    - (BOOL)textFieldShouldReturn:(UITextField *)textField
    {
        [textField resignFirstResponder];
        self.title = textField.text;
        return YES;
    }
    

    Please dont forget to #import <QuartzCore/QuartzCore.h>

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

Sidebar

Related Questions

I am setting up a UINavigationBar with 2 buttons that change their title when
I'm trying to make a custom UINavigationBar, but the problem is that my background
Similar to how z-index works in HTML, I want to make my UINavigationBar be
I want to make a done button appear UINavigationBar when any row in my
I'm trying to make this (excuse the quick-and-dirty mockup): It's a UINavigationBar with a
I know how to make a navigationController's navigationBar hidden: @implementation UINavigationBar (custom) - (void)drawRect:(CGRect)rect
Switching to iOS5, I wanted to make use of a custom styled UINavigationBar using
I want to make a custom UINavigationBar with a drop shadow. Doing so: UIImage
I make some JSON parser, and i wanna to show information in same ListView.
Possible Duplicate: iPhone SDK - make UINavigationBar transparent In my app I'm using 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.