This question already has an answer here:
Set image for tab bar IOS
(1 answer)
Closed 9 years ago.
I've created two custom png images that I want to use on my UI Tab Bar Controller. Both images are 29 x 29 pixels, which I believe is the right size for this purpose. I've added the files to the project, and referenced them from the Tab Bar. But when I run the app, they don't display.
The files are called cube.png and sphere.png. Here are screen shots to illustrate what i've done.
But when I run it, I get only this (no custom images)
How do I correct this?
Tab bar images only support transparent images in which the object should be drawn only in white color. If it contains any color,it will automatically converted to white. So use the appropriate image. You will get the result. For reference, you can find some of these here
Related
This question already has answers here:
iOS Launch screen code not running
(2 answers)
Closed 5 years ago.
I want to rotate an app logo on my Launch Screen (LaunchScreen.storyboard).
This link helps me in getting the code to rotate an image. However, where can I put this code?
Since there is no class file associated with the Launch Screen, how can I acheive this?
You can't directly do that as the launch screen is static. Even if it's set up via a .xib or a storyboard file, it will appear as a snapshot of the initial state of that scene.
You should create a view controller with the same look as your launch screen and animate that.
You can't achieve that. Before LaunchScreen.storyboard you was putting only static images in order to be shown on launch. LaunchScreen.storyboard is introduced later to simplify the generation of static images.
But you can kind of workaround it. You display exactly same looking view controller just after launchscreen and run animation. But there will be a little delay.
I just recently got a new set of icons for my app (from an external designer) and I am trying to implement them, but for some reason it ends up looking like this (the new icon is the one in the middle):
I have tried setting the image of the tab bar to have UIImageRenderingModeAlwaysOriginal, but that's given me no luck.
Here's the icon (it kind of blends into the background but its a white envelope):
Any reason why this is happening and how I can fix?
The problem is that the entirety of your image is opaque - at least part of it needs to be transparent to appear as you want it to.
In the below image (since the entire thing is white now, it's directly below this text), I have removed the black line and made that transparent. I then added this image to a tab bar, and it worked fine for me.
Here's the link to the image, as well.
What I ended up doing was setting using UIImageRenderingModeAlwaysOriginal for the tabbar image in the awakeFromNib method...that seemed to fix the issue.
Hello my Guys i have some Problems to set the image in the UITabbarController. I use the Interfacebuilder to do that. But when I start the Simulator the tabs don't even images. It would be very nice when you can help me.
it's better to get 10*10 size png images, and add it to your tab item, and then you will come to know what size you can use.
I'm developing an application which is designed to hold lots of instances of the same thing.
For example, amateur football teams can sign up and add their information to the app, and then browse through navigation controller/table-views to find their team amongst other teams.
Selecting a team would then open an instance of a view which would be tab-bar based.
The issue I'm having is the displaying of the tab bar icons. Other than that, it works perfectly.
There isn't any code involved, so my I can only really use images to explain.
Unfortunately I can't post images yet and can only post 2 links
Please look at the links:
http://s28.postimg.org/nxk8r1vst/IMG_3954.png
http://s28.postimg.org/6j00irynx/IMG_3955.png
When the tab-bar view is first opened in 1, you can see the icons aren't displayed correctly - the current tab is white tinted, the text of the other tab is default but the icon is white tinted. In links 2 and 3 they are highlighting and dimming properly BUT not picking up image tinting at all - i had set image tint to red to test it.
Image 4 is my storyboard for this. Doesn't seem to be anything wrong, as I said the navigation all works fine.
Apologies if this question isn't formatted properly. I haven't been able to find any answers and could really do with some suggestions.
Thanks
Are you sure you use the images for the UITabBar in correct format:
It should be in png format and in the following size:
About 50 x 50 pixels (96 x 64 pixels maximum)
About 25 x 25 pixels (48 x 32 pixels maximum) for standard resolution
Also the image should be white on transparent.
I'm almost positive that goes against an apple design directive.
Don't you mean several NavigationControllers one under each tab of a TabBarController i.e. NavigationControllers inside TabBarControllers and not the other way around?
By the images it looks like they are separate navigation controllers under distinct tabs
I got some free image icons for iOS, for example, http://glyphish.com/
but I think these images is for tab bar icons, not for bar button images. I used these images to bar button, but it isn't good to look due to alphas in image. Pure-white image is needed for bar button image.
Is there any good images for bar button?
or, how can I edit image to use in bar button image? I'm not familiar to graphics tools like photoshop.
or, can I use images by changing bar button properties? I think if images can be inverted, it'll be better.
Assuming you are developing an HTML/CSS/Javascript app - have you looked at Jquery Mobile?
You can use their standard bar icons, which are white with alpha background - see the JQM-docs on button icons here.
So regarding your questions:
1) Yes, you can for example stick with the custom icons provided by frameworks
2) You can always draw your own icons in Photoshop or (I prefer) Inkscape (free & easier). I did this in Inkscape for example. Works nicely in Jquery Mobile.
3) Inverting images - if you are talking about using an image as a "mask" - you can only do this on Webkit browsers using the -webkit-mask-image property without changing the icon (example: here. If you need this across different devices, you have to cut out icons from a background-image. I did this in my cross-browser tab-bar