I have two UITableViews and both show a space of about 30 px between the tabBar and the searchBar of the tableView.
The XIB in Interface Builder, looks good though, no space has been defined there.
Any ideas?
you need to set frame of both.
Related
There are a couple of things wrong with my UICollectionView and corresponding cells that are under a navigation bar. First of all, when the view first loads, there seems to be some extra space on the top. But when I do a little scroll down (not a full scroll), it adjusts to normal height. Check out the images below for what I mean. this is what I see when i first open the view controller
after a little scroll, not a full one (There are 10 cells in this VC), i see this. Why is this happening?
In your viewcontroller uncheck Adjust Scroll View Insets
Go to your storyboard in your view controller select your collectionView and from the side pane select size inspector there is an option of content insets set it to Never.
I have a UISearchBar linked with a UISearchDisplayController in the header of a UITableView in iOS7.
I set the UISearchBar with the style minimal. When the searchdisplaycontroller shows his table it has the behavior of the picture below. The table is scrolling above the searchbar. When I switch the style of the tableview to Prominent the table scrolls under the searchbar as expected.
Is this a bug or this behavior is expected?
The text isn't floating above the search bar, it's going below. Minimal style doesn't provide a background so this is expected. It will, however, provide a background during activation if there is a navigation bar present (Minimal style really wants to be over either no content or blurred content).
You are free to add your own custom background if you'd like.
Try with
self.edgesForExtendedLayout = UIRectEdgeNone;
in viewDidLoad method. It works for me.
I think this issue may for the Auto-Layout or Auto-Resizing. Just check in the nib file in insppector view.
Make the x=0 and y=0 for search bar and for tableview x=0 and y=44 , now you will get the tableview below the searchbar.
I have a problem, there is a way to separate the uisearchbar from uitableview?I want to put the searchbar at the top of the view, a little tableview at the bottom of view and an image between the 2 items?
thank you
kikko
I have a tableview with custom cells. Each cell has a UITextfield. When the last cell's textfield is clicked, the keyboard pops up and covers it and the table view won't scroll up any further. Is there a property of UITableview that can be set so that the last cell can scroll to half way up the screen?
Thanks in advance
There are a two ways to approach this (that I can think about off the top of my head):
You can use the tableFooterView property of UITableView to set an arbitrary, empty view to be about half the size of your table.
You can add empty cells to the bottom of your table
Both of these approaches will accomplish roughly the same thing, but using the tableFooterView property is probably your best bet.
see Making a UITableView scroll when text field is selected for a list of solution..
Also basing your view controller from UITableViewController (since you say its a table) will provide all this functionality automatically!
Is there a way of showing the scrollbars of a UITableView all the time?
Nope, the UIScrollView (of which UITableView is a subclass) doesn't support this.