title: Segmented Control on Navigation Bar
body: <p>I am adding a segmented control inside my view controller.My viewdidLoad is as follow</p>
  
  <pre><code> self.navController = [[[UINavigationController alloc] init] autorelease];
  UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:NSLocalizedString(@"Image", @""),
                                                                                     NSLocalizedString(@"Text", @""), nil]];
  [segmentedControl setSelectedSegmentIndex:0];
  [segmentedControl setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
  [segmentedControl setSegmentedControlStyle:UISegmentedControlStyleBar];
  segmentedControl.frame = CGRectMake(0, 0, 400, 30);
  [segmentedControl addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];
      self.navigationItem.titleView = segmentedControl;
  [segmentedControl release]; 
  
  [self.view addSubview:self.navController.view];
  
  [super viewDidLoad];
  </code></pre>
  
  <p>Only the navigation bar keeps on coming without any segmented control inside it.
  Can someone help and let me know what exactly is wrong here.</p>