title: NavigationController NavigationBar TitleView is Not Working in Navigation Bar Large Title in iOS Objective-C
body: <p>I'm stuck in titleview When i used Navigationitem.title then it show me in large title but title view is does not show please guys help me for this Thank You
  <a href="https://i.stack.imgur.com/lwBaz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lwBaz.png" alt="enter image description here"></a></p>
  
  <pre><code>:- searchBar Configure Code :-
        self.searchControllerInvoice = [[UISearchController alloc] initWithSearchResultsController:nil];
           self.searchControllerInvoice.searchResultsUpdater = self;
           self.searchControllerInvoice.delegate = self;
  
  :- Navigation And TitleBUtton :-
                  CGFloat maxTitleWidth = self.navigationController.navigationBar.frame.size.width;
              CGSize requestedTitleSize = [selectedName sizeWithAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:17]}];
              CGFloat titleWidth = MIN(maxTitleWidth-130, requestedTitleSize.width);
  
              if(!TitleButton)
              {
                  TitleButton = [UIButton buttonWithType:UIButtonTypeSystem];
                  [TitleButton setFrame:CGRectMake(0, 0, titleWidth , 22)];
              }
  
              [TitleButton.titleLabel setFont:[UIFont systemFontOfSize:17]];
  
              TitleButton.titleLabel.adjustsFontSizeToFitWidth = YES;
              TitleButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
              [TitleButton setTitle:selectedName forState:UIControlStateNormal];
              [TitleButton setImage:image forState:UIControlStateNormal];
              [TitleButton addTarget:self action:@selector(titleButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
  
              TitleButton.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
              TitleButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
  
               if (@available(iOS 11.0, *)) {
                    self.navigationItem.searchController = self.searchControllerInvoice;
          //          [self.navigationItem.searchController.searchBar setBackgroundColor:UIColor.redColor];
               } else {
                    self.getInvoiceTable.tableHeaderView = self.searchControllerInvoice.searchBar;
               }
  
               self.navigationItem.titleView=TitleButton;
  </code></pre>