3
votes

I'm making customized UIScrollView such like pinterest's two column view.

The scrollview should have search function. So I tried to use UISearchDisplayController but I can't because UISearchDisplayController implements only UITableView.

So, I created search display controller such like UISearchDisplayController. It's good. well done.

But I have a big problem. I can't implement completely behavior of UISearchDisplayController when go to detail view.

See below images.

this image is UISearchDisplayController's behavior on Simulator's Contact App.

enter image description here

Detail view have a navigationBar when pushed. but first view's navigationBar is hidden.

enter image description here

The UISearchDisplayController's behavior is good to transition view. Search view don't have UINavigationBar and detail view has UINavigationBar separately. but my controller can't do that.

I call setNavigationBarHidden:animated method try to hide navigation bar when touch UISearchBar on search view.

How to implement second image. any ideas?

sorry for my bad english :)

1
do you want to hide second view's bar hide when u pushed that view?freelancer
Why do you assume the first views navigation bar is hidden just because it has a different tint and theres a search field on it?deleted_user
try this code it may solve your issue [self.navigationController hidesBottomBarWhenPushed]freelancer
What is the problem with setNavigationBarHidden:animated? Is it not hiding? If that is the case, why cant you add your searchbar to navigation bar itself by removing backbarbutton? It should behave the same way right?iDev
@SmartWork hidesBottomBarWhenPushed is just hide bottom bar such as UITabBar.Dae KIM

1 Answers

0
votes

The search bar is different view, so here you need to call the below methods while view is navigating from one view to others.

self.navController.navigationBarHidden = YES;

or

[self.navigationController setNavigationBarHidden:YES animated:animated];