Search bar disappears on tap - ios

I am trying to implement UISearchDisplayController searchBar on a view not having a navigationbar on it, my searchBar fixed as
[self.view addSubview:searchBar] and framed above the UITableView having contact numbers. When I tap on searchBar my UISearchBar disappears and the table scrolls up.

Related

Animation Delayed for navigationBar "hidesBarOnSwipe"

Hi everyone I have a UITableViewController that hides the navigation bar when the user writes the tableView
navigationController? .hidesBarsOnSwipe = true
When the user shows the navigationBar by scrolling down the tableview, the navigationbar's slide animation appears to be delayed showing a black space between the tableView and the navigation bar
How can you solve this problem?
Here you can see what happens when the navigation bar is shown after the user scrolls down
Maybe you can try in viewDidLoad in your UITableViewController
self.edgesForExtendedLayout = []
Hope it will help you

Swift : Hide UIView from Bottom on Scroll like Twitter

I want to hide UIView while scrolling down and showup when scrolling up.
So I have a tableView and I would like to hide the UIView above it as the user scrolls down and showup when scroll up (here is example below):
UIView below navigation controller+Embedded Segmented Controller in the UIView.
Should I use: scrollViewDidScroll ?

UISearchController's searchbar is not responding

I am not able to get responding events on tapping UISearchController's search bar in iOS 8.
I am displaying custom view with dim background like alert view appearance, on pressing button in a view, where custom view has UISearchController's search bar as sub view. Programmatically added searchController. When I try to touch search bar, it is not responding in iOS 8 whereas I have added search bar with UISearchDisplayController for iOS 7, it is working fine.
I have viewController A with navigation bar. In viewController A, I have a button. On pressing button, I am trying to show view as custom view with dim background like alert view appearance. So I have added following line in button method.
class_name *view = [[class_name alloc] initWithNibName:#"xib_name" bundle:nil];
[self.navigationController.view addSubview:view];
Xib file of class_name has dim background with subviews like searchController's search bar.
Instead of
[self.navigationController.view addSubview:view];
added
[self presentViewController:view animated:YES completion:nil];
UISearchController's search bar is working now but i am not able to get transparent background view, instead black background appears.
I need to display previous views content and on top that current views content like alert view.
Please guide me in objective-C.

UISearchbar Hide/Show Issue in UITableView

I have UISearchBar on my UITableView set as its tableViewHeader using InterfaceBuilder. I have hidden it under the UINavigationBar using
self.tableView.contentOffset = CGPointMake(0.0, self.searchBar.frame.size.height);
in my ViewWillAppear method. The problem is that if I go to the detailView and come back to this TableView, if the TableView has more than the screen visible cells, it works fine and hides the SearchBar as it is suppose to do, but if there are less than screen visible cells (i.e. tableview has 0 - 4 cells) then the SearchBar doesn't Hide.
Does anyone know why this is happening?
thanks in advance

NavigationBar coincides with status bar when searchDisplayController is activated iOS 7

I have a tableView controller which has a searchbar added to tableHeaderView. When I click on searchBar it animates to cover the screen. However, the view behind gets adjusted and navigationBar overlaps with status bar as shown below:
It adjusts back fine, when the search is cancelled. How to hold the view at the back of searchDisplayController not to overlap the status bar?
fixed by doing: [[[parentFileViewController navigationController] navigationBar] setHidden: YES]; in searchDisplayControllerWillBeginSearch method where parentFileViewController contains the searchBar

Resources