ios11 Attach custom view below UISearchController UISearchBar that hides with the Searchbar - ios

I had a UISearchBar with which i attached a custom view below which gave some buttons for filtering and sorting... now i want to use the ios11 UISearchControllerthat provides a searchbar which smoothly hides into the top NavigationBar. I looked around some and tested a few things but cant figure it out properly. The custom view should hide when scrolling up as well.
Any tips or anything i can read up to get a hold on this? (I'm relatively new to ios development)

Related

IQKeyboardManager - keeping the UINavigationBar sticky to the top

I'm using IQKeyboardManager in Swift to handle the keyboard in my app (it's a chat app and the UICollectionView and the UITextField should move up and down according to the keyboard's position). It's working great.
My only problem is that it moves the whole view up, including the UINavigationBar and that's why it looks very weird. I want the UINavigationBar to remain sticky on the top of the screen.
Any idea how can I do that?
Thank you

Custom UISearchBar hides when is active iOS

i am developing an app ios7, got a custom UISearchBar at top of a UITableView with an UISegmetedControl, the problem is when i start to search, searchBar goes left and hide, so is imposible to handle it, how can i make the UISearchBar stay on it's position??

Take UISearchDisplayController full screen with UIView acting as UINavigationBar

I am having a hard time adding a UISearchDisplayController to my app. The situation is this: The primary navigation in the app takes place by scrolling between UITableViewControllers whose table views are all subviews of a UIScrollView. Each of these has a UISearchDisplayController for searching the contents within each UITableView.
I also have a UIView outside of the UIScrollView which takes up the entire width of the screen and 85 pixels of the height, located at the very top of the interface. This acts as a kind of UINavigationBar, but due to the very custom nature of this element, I have made it a subclass of UIView.
My problem is that when you activate the UISearchBar, I want the "navigation bar" to move off the screen and the UISearchBar to take its place (like in the native Mail app where tapping the search field hides the navigation bar). It seems to me like I not only have to manually hide the "navigation bar" but also expand the size of the UIScrollView and all of its nested UITableViews in order to achieve this.
I am still a novice, so I am completely puzzled as to how to do this. Is there a simple solution or do I have to do this all manually and/or restructure my code in order to create the desired effect?

UISearchDisplayController - can see content scrolling behind it

I've got a UISearchDisplayController which displays search results in a UITableView that's right below it.
Everything works ok, I'm able to populate the tableview on the UISearchDisplayController, but when I scroll the tableview, the contents of the tableview are shown scrolling up behind the UISearchBar under the status bar of the device.
Has anyone got any experience of how to prevent this from being shown? All of my other view controllers I'm setting the navigation bar to have a specific colour, but on this search controller it doesn't take effect.
This is a known problem if you are using the UISearchDisplayController in a uipopover
I have the same problem and a lot of solutions provided by others do not work. I am actually quiet close to nailing it now. It is all about doing a notification to handle the keyboard hide and setting up the search results tableview content size

iPhone: hiding a custom view under the navigation bar

For the app I working on, I am implementing a control that is similar to the notification view on iOS. So, I am working on dragging a view down from under the navigation bar of the UIViewController.
My question is whether there's a way to position a view that is MOSTLY hidden under the navigation bar?? The goal is to have just a few pixels visible, so that there's a way to grab it and drag down.
Thanks!!
Alright, resolved this issue myself. Turns out what works for me is having a custom view and then adding that view in IB in the order where nav bar comes after that custom view.
Another trick was to figure out how to initialize/embed that custom view and for that I found help here: UIView subclass with its own XIB

Resources