UISearchDisplayController search bar overlaps the label above in iOS 7 - ios

My view controller has a label on top that provides a description regarding the search to be performed. Below this label there is a UISearchDisplayController having a search bar that performs a search. This behaves normally without any issues in iOS 5 and 6. However in iOS 7, the search bar looks different. First of all, the search bar icon is placed in the centre of the search bar instead of being left aligned as it was in the case of iOS 5 and 6. Is this the default behaviour of search bar in iOS 7 ? This is my first question.
Now when I click inside the search bar, the search icon moves to the left, and the search bar enlarges itself, i.e an extra grey shaded view springs up above the search bar which overlaps the label above. Please observe the figure below to understand what I mean. My second question is this, Is this the default behaviour of search bar in iOS 7 ? Is there any way to get rid of this grey shaded view that comes above the search bar ? My opinion is this view is quiet unnecessary. Is there any property in search bar which I have to set in order to prevent this grey shade from appearing ? Or do I have to resize the search bar instead to avoid this ? Any suggestions from your side would be welcome. Thanks in advance.

Related

Customize UISearchController in TVOS

i'm working with UISearchController in TVOS application. I'm facing few issues in that.
Basically, this controller is embedded in tabBarController, and i want:
1- Search bar to be placed below the tab bar. Is it possible? I don't want to make my tabBar translucant but to change the frame of search Bar. Is it possible
2- As shown in image, i want the color of alphabets and other keys to be pink (when in focused mode). The default color is black (for focus mode) & grey (for normal mode). How to update that?
Thanks

Search bar partially disappears when switching views in iOS 7

We have a UISearchBar backed by a UISearchDisplayController in our app. Changing screens with the search bar hidden partway under the header causes that portion of the bar to be gone when the user returns, revealing the search bar's background. Here, I have it set to red which shows me that the search frame size and position are still correct.
Tapping anywhere inside the bar brings up the keyboard as expected. However, once the bar moves to the top of the screen, the part that was hidden stops responding to input. This blocks text selection and taps to the top of the Cancel button.
I have experimented with all of the answers in this question without success, so I think our issue is different, though likely related. Does anyone know what's going on, and how we can fix it? Thanks for your input.
If you are running on iOS 7.0 version then you need to set following property which is newly introduced in iOS 7.0 as follows
self.edgesForExtendedLayout = UIRectEdgeNone;
as by default edgesForExtendedLayout property is set to UIRectEdgeAll that means the view controllers use full-screen layout by default. And your's searchbar appeared to be rendered behind the navigation bar, starting from navigation bar offset.

UISearchBar covered up when searching

I have a UISearchBar and a UITableView positioned inside the view of a UIViewController. The table itself and the search function are working fine, but there is a problem with how the search results are layered over the top of the search bar. I'm sure there is something I have misconfigured, but being new to iOS development, I cannot figure out exactly what it is.
This is how the UISearchBar and UITableView are currently positioned within the view:
However, when your tap the search bar, the transparent overlay which appears covers it up. I would expect it to only appear below the search bar or perhaps for the search bar to move up?
If you begin to type, the search results appear, but the search bar itself has now been completed covered up:
I have tried the following:
Moving the UISearchBar to the header of the UITableView. The result of this is that, when searching, the search bar is moved to the very top of the view but when the search has finished, it then is positioned way off the the left so only the very right edge of the search bar is visible!
Disabling the Under Top Bars and Under Bottom Bars options under the Extended Edges options for the view controller (options in Xcode Interface Builder). This results in the same problem, except the Tab Bar and Nav Bar are a different colour (see image below, with keyboard hidden):
This view has been built using a Storyboard. Here is the heirarchy for reference (the Scroll View is hidden in all the screenshots as it only appears on the right once a search result has been tapped):

UISearchDisplayController on iOS7

I'm having a very annoing problem on iOS7. I have a VC with different subviews, one is a tableview that is display fullscreen after pressing a button. This tableview has a search bar with a scope bar in its header that is linked to a search display controller.
On iOS 6 everything runs fine, when I press on the search bar the scope bar is displayed and the rows correctly slide at the bottom as you can see in the images (forget about the big X).
On iOS7 I have a problem.
Everything seems OK(and it's under the status but I know how to fix that).
But when I start a search the layout change leaving some blank space at the top, this doesn't happen on iOS6.
How can I solve that? where this problem comes from?
Andrea
It looks like your search results are pushed down by the status bar height. Try fixing your header position (so it's not under the status bar) and see if that works. If not, you'll need to share some code to show how your layouts are constructed.

How to increase the height of the navigation bar and change the vertical position of the title using xcode 5 (iOS7)?

I developed a simple app for iOS6 and now I'm to updating its appearence for iOS7. One of the first changes I would like to do concerns the navigation bar.
I'm using the standard navigation bar UI component that comes with xcode. While in iOS6 the navigation bar was clearly placed under the status bar (i.e. battery, carrier and hour), in iOS7 the navigation bar blends with the status bar.
My question is: how can I increase the height of the navigation bar and place the title vertically a little lower than the default position?
Currently I have this:
And the title is too close to the time. I would like to achieve this (standard Photos app that comes with iOS7):
here the title of the bar is lower and the bar is larger (or is just shifted down).
It have been trying to modify the height of the navigation bar through the size inspector but with no success.
It's probaly a very easy issue to solve, however I'm still new to xcode development and I can't figure it out.
Stick the view controller in a Navigation Controller, that should immediately solve the problem

Resources