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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:37:28+00:00 2026-05-20T05:37:28+00:00

I am trying to put this in a navigationbar, but doesnt show up, can

  • 0

I am trying to put this in a navigationbar, but doesnt show up, can u
have a look at it?

UISegmentedControl *seg1 = [[UISegmentedControl alloc]
initWithItems:[NSArray arrayWithObjects:@"von mir", @"alle", nil]];
[seg1 setSegmentedControlStyle:UISegmentedControlStyleBar];
UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithCustomView:seg1];
UIBarButtonItem *flexItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:self action:nil];
[self.navigationController.navigationBar setItems:[NSArray
arrayWithObjects:flexItem, barItem, flexItem, nil]];
[flexItem release];
[barItem release];
[seg1 release];
  • 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-20T05:37:29+00:00Added an answer on May 20, 2026 at 5:37 am

    UINavigationBar‘s items property only accepts an array of UINavigationItem objects, not UIBarButtonItem objects. You can’t configure a navigation bar the same way as you do a UIToolbar. Instead, in your view controller, do this:

    UISegmentedControl * seg1 = [[UISegmentedControl alloc]
        initWithItems:[NSArray arrayWithObjects:@"von mir", @"alle", nil]];
    [seg1 setSegmentedControlStyle:UISegmentedControlStyleBar];
    self.navigationItem.titleView = seg1;
    

    This adds the segmented control to the title view of your view controller’s navigation item, which is a custom view that appears centered on the navigation bar.

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

Sidebar

Related Questions

I'm trying to put this data type in a Haskell Set, but I don't
I'm trying to put together this layout... ... but I'm having issues with the
I am trying to put this function ((click_add)) in library so that i can
I am trying to put this css menu together but I couldn`t get it
Edit: I put this snippet of code in jsbin: http://jsbin.com/eneru I am trying to
I am trying to put some distributed caching into play, I'm using this indeXus.Net
We're trying to put together kiosk solution where we can charge people by hour
I'm trying to put the logic together for this and it seems like I
Im tired of trying to put this working :( So, here is my problem:
Trying to figure out what I'm doing wrong when trying to put $(this) in

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.