开发者

Navigation bar items disappear from navigation bar

I have been struggling for some time with the strange behavior of navigation bar items. I have segmented control o开发者_开发百科n the navigation bar (take a look at the image below)

Navigation bar items disappear from navigation bar

where List button pushes table view controller with UISearchDisplayController. To show table view controller I use the code as it follows:

if (uiSegmentedControl.selectedSegmentIndex == 1 )
{
    DetailsTableVewController* detailsViewController = [[DetailsTableVewController alloc] 
                                                         initWithList:list]; 
    [self.navigationController pushViewController:detailsViewController animated:YES];
    [detailsViewController release];
}    

Then to return back I use the following code:

[self.navigationController popViewControllerAnimated:YES];

Although I use the code above to go back to the previous controller when UISearchDisplayController is either active or inactive I have different behavior of the navigation bar items. When UISearchDisplayController is active ALL items disappear from the navigation bar

Navigation bar items disappear from navigation bar

Does anybody know why it happens? Thanks in advance.


Moved all navbar initialization code from viewDidLoad to viewWillAppear in controller and it solved the problem

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜