Is there a search bar that shows results in a sub screen in iOS/Swift? - ios

I have a screen with a UITableView. I would like to add to it a search bar (that searches on the internet) and shows the found results in a sub screen. When an item on the sub screen is clicked, I'd like to add it to my table. Is there such a search bar in iOS? I added a paint in order to make things clearer.

UITableViewControllers have a restriction: its main view must be a UITableView that takes up the entire screen space (except for a possible navigation bar at the top, and a toolbar or tab bar at the bottom).
If you want to have other views such as a UISearchBar you must use a UIViewController and add a UITableView and a UISearchBar

Related

Is there any maximum limit to show number of bottom tabbar items in iOS?

In my iOS app I want to display more than 8 items in my bottom bar like tab bar items.
For that I have used UICollectionView like tab bar at the bottom.
But one of my friends told me that Apple will reject the app if the bottom bar has more than 5 items. Is that true?
Or does that restriction only apply to UITabBar?
Please confirm. I am using UICollectionView instead of UITabBar.
It is true. The human interface guidelines say that for a bottom bar there should be around 3 to 5 items.
Yes you can make it, but for his purpose you need to make a custom tab bar, you can't use tab bar controller,
Place a UIView on top of a controller where you see view controller and exit etc. and place a view inside it and place Image view and buttons and set constraints.

How to design a tabbar inside a view

I need to make this view:
A view on top of the tab bar with some data. (image, name, text, ...)
tab bar has a 3 page and every page has a separate view
When user scroll up, tabbar will be scrolling top of the page and a UILable stands top of tab bar. It can be show with some fading animation (not important right now)
this is after scrolling:
I search in cocopods but I didn't find solution.
---- EDITE
I want to know how to put uitabbar inside a view. Is it possible ?
If yes, How to change just sub view of tab bar when I change tab bars!
I want to know how to put uitabbar inside a view. Is it possible ? If yes, How to change just sub view of tab bar when I change tab bars!
Yes, but I wouldn't describe the thing you are showing in your screen shot as a "tab bar". It is a UISegmentedControl. So all you have to do is respond to the user tapping on a segment of the UISegmentedControl by substituting one view for another, and that's easy to do.

Changing the location of a search bar in an embedded navigation controller xcode

So currently my app looks like this:
I don't like the blank space at the top of the table view controller, or how the search bar disappears when you scroll down the list. I was wondering if it was possible to move the search bar onto that space at the top for the table view controller, so that it doesn't look empty and the search bar is always at the top of the screen.

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):

Multiple bars at top in iPad Screen

I want to know can we create 2 bars at top like in this screen shot. one top bar with multiple buttons and search bar and second one with the back button.
You can use the UINavigationBar from the UINavigationController and you can add on the view of your currently displayed UIViewController a UIToolBar right at the top of the view.

Resources