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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:39:09+00:00 2026-06-16T00:39:09+00:00

I want to make a standard navigation bar button for my bar’s title. I

  • 0

I want to make a standard navigation bar button for my bar’s title. I can set a custom view. In the sample below, I’ve done this with a UILabel. But I don’t see how to make a standard navigation button.

-(void) setTitleButtonWithText: (NSString*) text {
    self.title = text;
    UIFont* font = [UIFont boldSystemFontOfSize:18];
    CGSize size = [text sizeWithFont:font];
    size.width+=6;
    size.height+=6;
    UILabel* titleLabel = [[UILabel alloc]init];
    CGRect frame = CGRectZero;
    frame.size = size;
    self.navigationItem.titleView = titleLabel;
    titleLabel.frame = frame;
    titleLabel.textColor = [UIColor redColor];
    titleLabel.text = text;
    titleLabel.font = font;
}

enter image description 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-16T00:39:10+00:00Added an answer on June 16, 2026 at 12:39 am

    titleView is a UIView property, so since UIBarButtonItem is not a UIView it cant be used here, as an alternative you could try making a UIButton with the same style and set that as the titleView

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

Sidebar

Related Questions

I want to make a back button for a navigation controller with the title
I want to make a function in standard ml that checks if a tree
I want to make a function for a new datatype in Standard ML, the
In Lucene, using a Standard Analyzer, I want to make fields with spaces and
I want make interactive application where user launches it and can do various task
I'm trying to customise the standard WiX Progress Dialog (I want to make it
I want to make a Deep Copy of some Object[] and ArrayList How can
In Lucene, using a Standard Analyzer, I want to make fields with space searchable.
I want to make an app which (amongst other things) can parse feeds loaded
I want to make a collection that stores groups of users. A user can

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.