How to reduce spacing between items in Navigation Bar? - swift

In my Swift project I have 2 items on Right Bar but I see that spacing between them is too big. How to reduce it? Or how to move pen icon closer to time icon?

You're not in control of the spacing of separate bar button items. You could make a single bar button item containing a custom view holding two buttons, and then you would be in control of their spacing.

Related

Implement custom tab bar in flutter

How do I implement this kind of tab bar and tab bar view in flutter. When user swipe left the tab change to dog and the dog product get bigger.
I would say the easier way to accomplish that design is to couple a slider with a top bar and bind the indexes.
You could start by using a slider package, customize it to look exactly like your design.
Then you add a Row on top of it with your categories and bind the onPressed from this row of buttons to jump on the desired index in the slider.

Common UIToolbar for the required pages - Xcode 8.3

Please suggest that how we can create common UIToolbar(with bar items) for the required pages?
I know that we can add custom UIBarButtonItem in each view controller.
Assuming you use storyboard. First, drag a UIToolBar item to your storyboard.
Next, set up the location of the tool bar. In my example, I put it on the bottom with padding 0 to left, right and bottom. The height is set to be 44
Finally, drag as many Bar Button Item as you want to your tool bar, and then add spaces between them. You can either use fixed length spaces, or the flexible ones (which are used in this example) by simply drag them between the bar button items.

Add space to toolbar in iPhone

I am new to iPhone,
I have added a toolbar in my .xib file and then added 5 BarbuttonItem to the toolbar,
see snapshot:
you can see bar buttons on toolbar, but there is no spaces between them.. what i want is.. there should be sufficient space between all button like search bar to placed at extreme right, a and A should be in the middle of tool bar.
when i try to drag search bar at extreme right it drags properly but on living of mouse click search bar again comes to it's original position.
How to solve this ?
Any help will be appriciated.
In the Objects panel there are two UIBarButtonItem subclasses named Fixed Space Bar Button Item and Flexible Space Bar Button Item. You need to use those two to adjust your spaces.

UITableView has blank space below, can't remove

I have a UITableView that displays some data that is read in at runtime and features a button below it that will refresh the list when clicked. All of that works fine, however there is a problem with the layout on the simulator.
When I run, there is a space at the bottom of the table that pushes the refresh button down. No matter how long the UITableView is, the UIButton will always be kept at that extended distance. If I overlay the bottom with the UIButton, it does display with slightly less padding. I am at a loss of how to fix this.
Image with example of behaviour: http://img864.imageshack.us/img864/9913/screenshot20120326at113.png
I think the problem is that in the interface builder your layout does not show at the same size, because it lacks the navigation bar at the top.
In the visual editor, choose the window hosting your table view, go to the attribute inspector, and choose Navigation bar for the Top Bar entry in the Simulated Metrics section of the inspector. The layout of your design will change. Resize your table view, move your button, rebuild the app, and run it again; this should do the trick.
It looks like it's because you're designing without the navigation bar simulated and you've set up your autoresizing masks incorrectly.
What you can do is either enable the simulated metric (attributes inspector in IB with the main view selected) for the top bar set to Navigation Bar, or you can go and fix your autoresizing masks. They are the red things in the size inspector in IB.
It is because when you designed the screen you didn't consider the navigation bar that is gonna come. Simply add a bar to the screen on the top and rearrange the table and button with proper autoresizing masks. It will fit.

iPhone-SDK:Tab bar item images are not visible

I created a Tab Bar Controller which has 5 tab bar items. I am trying to add images for all the items through interface builder. I am also able to choose images and set for the particular tab bar items. But whenever i set an image, it does show blank white screen instead of the complete image. P.S: My image is not corrupted, it is a good image. My image size is 24*24. I am not creating tab bar controller items programmatically.
Any suggestions please?
The images must be PNGs with transparency, and only the mask is used. See http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html