Increase width of tab bar item to fit image - ios

I am doing a simple tab based app, with one 2 tab items and I would like to have an image in
each tab.
The problem is, tabbarcontroller is cropping the images rather than fitting them in. I just have two images, basically text, saying "ABOUT","SETTINGS" and i would like them to take the full width of the tab bar. Something like the attached image. How can i achieve this without the images getting cropped.
Referring to the image "ABOUT" & "SCAN QR" are images.
Thanks

I don't think what you wish to accomplish is achievable by using the standard controls.
I'd recommend using a custom toolbar instead of the tab bar controller.

Related

Navigation bar button images on swift

When trying to customize my navigation bar, it asks me about what images I want to use. I want to customize these images. I use Adobe illustrator to customize various icons. However, when I add the image to the assets and select it, the image is often larger than the navigation bar.

iOS 11 - Adding Background image to Navigation bar

I have a view controller with Large Titles and I want to add a background image to it so it takes up the whole navigation bar.
Does anyone know the best way to do this. I've search all over the internet but yet to find any good examples.
Thank you
Goal is to look like this view from starbucks app.
I have checked the image. I think the best way is to add an image view at top. Then on that image view place two buttons with appropriate constraints. Then underneath that image view, add the tableview. Then in the table view cell, at first index you can add the textview, if it is a large text and underneath cells will cover all the things your require with labels in the left and the > image in the right which will lead to a different screen.
I ran into a similar problem just like this and I didn't find any solution over the internet neither. But I do have a simple work around that might be helpful.
What I did is setting the image as navigation bar's background and also add the image to the view in the VC. Make sure the navigation bar has no shadow and its translucent property is set to NO.

how can I make three paging views with a custom nav bar in swift

Final Design
I'm trying to make this, three paging views in one with a custom nav bar with icons that will scale when its view is brought up. What is the best way to make the three views, like snapchat's, and how can I relate them to the icons in the nav bar to them? I know that I'll use collection view inside those views with supplementary cells.
I tried to make a Collection View with 3 cells moving horizontally to make the views but I cant relate the icons in the nav bar.
By the way, is it possible to make the navbar triangular like in the GIF?
This is a very broad question but will try to give you pointers for each of the features you are requesting.
To handle the paging views similar to snapchat with relative icons check out SLPagingView. This is a great place for you to get started. You'll need to add in some more code for the scaling but should be trivial.
In order to create a navigation bar similar to what you want you'll need to subclass UINavigationBar and override sizeThatFits and set a backgroundImage. See here here and here.

Give tabBar 2 different colors in iOS?

I am working on a new iPad version of my app which is using a tabBar. I want to add a containerView to the left (the black area) in all my tabBar-Views UI:
Since container views can't overlap the tabBar (I guess?) the UI will look weird in the left corner of the tabBar. The goal / aim is to accomplish something like Spotifys iPad UI but with a native tabBar in the app:
So is it possible to color the tabBar UI's left corner? Like 100 width to the left with another color? If so, how? Or maybe another trick?
Regards
If i did not understand wrong, the thing you need is a side menu. You may have a look at https://github.com/romaonthego/RESideMenu

UIButton is out of navigation bar

I have a custom UI Button (just regular button but with image), within the navigation bar, but when I choose my image it looks like this in designer:
As you can see here, it's over my provider and status labels, and also when I run application it's over the WebView (which is bellow), so definitely out of navigation bar. I tried to find in storyboard some property where I can adjust this but I couldn't find any. I'm using swift and storyboards.
Appreciate any help, iOS newbie :)
Based on your description I think your issue is that you are trying to add a button for navigation. What you need is a NavigationBar with a NavigationItem/BarButtonItem in it. If you look in the object library you will be able to find these.
Just drag them onto your story board. Once there select the button and in the side menu you will be able to select the Image for that Item. Now it is in the navigation bar up top. Let me know if there are still issues. 👱🏼
You have to make sure your 1x image is to the specified size (and then your 2x etc, or just use a PDF at the 1x size.
Icon sizes are here: iOS Human Interface Guidelines: Icon and Image Sizes
I made my pdf 22x22 and added it to .xcassets with scale factor "single vector"

Resources