Bar button item icon size and width - ios

I have a navigation bar with 3 bar button items. But i wonder why i have a huge space between first two icons ? And why default share icon less then my custom icons. My custom icons have size 29x29.

Update: for navigation bar, you simply need to place all three items in one of the two (Left Bar Button Items) or the (Right Bar Button Items) as follows:
and it should look like this:
As for tool bar items:
What you need to do is put a flexible space bar button between your buttons like so:
then it will look like this:

Related

How to adjust the position of tab bar item iOS?

I want to create a custom tabBar like this
Now I just can create a tabBar as below, I want the 4 tab bar Items (the add sign is a button) to be centered and don't cover the button, so the cart icon should move to the left a little bit, and the mall icon should move to the right. But I don't know how to adjust the position of tab bar item, neither using storyBoard or in a programmatic way.
Thank you for your help.
You should try adjusting the insets for the individual icons. You can do this in the storyboard.
Check this post:
Moving UITabBarItem Image down?
Please modify Item Position in Attributes Inspector in Storyboard.
Select Item position as "Centered".
Choose Custom for Width and Spacing.
Play with the numbers for Width and Spacing and set it was you wish.

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.

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

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

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.

Bar Button Item is not Showing

I am trying to create a bottom toolbar. So I dragged I Bar Button Item to the View Controller and it was automatically position at the bottom, see image below:
But when I run the app, it doesn't show the bar at the bottom.
I already added:self.navigationController?.navigationBarHidden = false
I think it's just only a constraints problem.
First of all check your Document Outline near to the left of your table, to see the position (toolbar is just below table):
Add your constraints and pay attention to all options as shown in the picture:
Then, take a look to the size inspector, for the table view:
And for the toolbar:
This configuration working both in portrait/landscape mode.
Drag UIToolbar controller directly instead of only UIBarbutton item.
self.navigationController?.navigationBar.hidden=false
Have you set constraints of UIToolbar? I just guess it can be one of the reasons why you cannot see your barbuttoitem.
The navigation bar and the toolbar are two different things and the toolbar is hidden by default. Try setting the toolbar hidden attribute to false.
Sometimes bar button item and bar button do not show when we present our screen. On screen we can then not see bar button item and bar button. So we need to push our screen if we want bar button item and rightBarButtonItem.

Resources