tab bar icons appear as blue squares - ios

Well, the title says most of it. I've tried with icon sets of 75/50/25 px and 72/48/24 px, as stated by different guides, but when I run the app in Xcode, the icons appear as (appropriately sized) blue squares. The icons are all black and white .png files, with negative images for the selected images. Any suggestions would be appreciated.

This might not fix your issue, and also may seem very obvious. But I'll put it here just in case it helps anyone.
First of all, I'm going to point out scenarios to check that can get you in this state that may or may not apply to everyone:
The asset's render type is set to Template Image
You are changing the tabBar.tintColor
If either of these are true and you are getting a solid colored square as your icon, the first thing I would check is the actual image you are using. It is probably an image/icon sitting on a white background or something like that rather than a transparent background.
If you are using a .png, .pdf, or .svg icon and want to tint the icon, you will need a transparent background. Transparency doesn't exist for .jpegs so they just won't work for tinting the icons.
This is because changing the tint will tint the whole image. If there isn't transparency, Xcode will have no idea what is icon and what is background. So a 40x40 icon just becomes a colored square.
Another benefit of using a transparent background will be now instead of having multiple images for selected/unselected states, you can just set the desired colors for .selected and .normal states and use one image.

Okay, the solution is NOT to set the image to render as image, but to use an alpha 0 background instead of a white background on the icon image.

Another tip. Don't name your image assets the same name as iOS System icons/glyphs. I had a download icon labeled download(.png). After renaming the issue disappeared. Very inconsistent behavior.

Related

I need to adjust the border of this ios icon

My app icon is showing with white borders, how do I remove it?
this is happening only when I try to build the application for ios, on the android system this does not happen
I tried modifying the alpha channel but it didn't work.
image link: https://imgur.com/IiVoRIj
It looks like your image has some white (or transparant) color on the edges. If that's the case I would open the image in a image program, zoom in, find these spots and fill them with the background color.

How to display a background image for a kivy button unchanged?

I want to use a background image for a kivy button. I have used the following builder string:
<MenuScreen>:
BoxLayout:
Button:
background_normal: './Pictures/my_background.png'
The image is displayed, however, it is much darker than expected and partially inverted. What do I have to do in order to display my original image without changes?
The resulting button
Original image
I think your problem is that the two colors in your image are grey and transparent (the white appearing areas are actually transparent in your image). In a Button, the background_normal image is multiplied by the background_color which is also a shade of grey by default. So what you end up with is the background grey showing through your transparent areas (white areas above) and your grey appearing everywhere else. So there is not much contrast. See the Button Docs for more information.
You can modify your image (using something like Gimp) to replace the transparent areas with a white color, and perhaps change the grey colors in your image with black. The distortion of the image is due to Kivy fitting your image to the button size.
Here is your image edited as I described. You should be able to click on it and download it.

iOS/iPhone app seems to add a color mask/color shade to my text

I have some colored images and same colored text on an iPhone App screen. The images show as expected, but when I use the same RGB color code on the text, it appears different on the finished app (mostly, a little darker). Why is xcode changing the color I tell it to use? How to get the text color to exactly match the color codes in the images.
Update: Here's a screenshot. I use the color picker from inside XCode, to pick the color from the image, so it shouldn't matter which color space I'm using (I'm using the same for both text and image), it still looks different.
It's very popular problem about different colors...
1) Try to use Digital color (native mac application)
2) Try to off text shadow, if you use it from your label.
3) And, all of its, is not a wright way to resolve this problem, if you want to color like on image you should correct them manually in you code or in interface builder.

Toolbar button image suppressed

I have a viewcontroller with a toolbar with 2 bar button items. The image on one is a simple flat icon. The other is a complex image reduced to 28x28 pixels from a 256x256 image. The complex image shows up as a blob as shown below. The actual image is also show in the picture. It is not clear what I am doing wrong. The project code is available in the following link:
Project code
John Griffith on Apple Developer Forum provided this explanation which made a lot of sense. I need to redesign my icons if I want to proceed along this line:
Toolbar images are normally rendering mode "template" - only the alpha channel is used. Any non-transparent pixels are drawn in the bar's tint color. It may be possible to create a UIImage with rendering mode "always original" to preserve the look of your image, but then it won't respond to changes in tint color.
I have downloaded your project. The first thing you should do is to move your image files into the images.xcassets folder. Read here to understand why.
The image you are trying to display is actually just a red rectangle:
As you can see, opening in another program also just displays it as a red rectangle. Be sure to use the correct Image file. The problem lies not with your project but rather the image file you are using.

Can I use a circular iPhone app icon?

Obviously the image file itself is 120x120, but the inside would be a circle in a fully transparent square.
Should I ask for full square icon?
I don't want to share my icon because of the client.
The answer is a "soft no" -- from the HIG:
Avoid transparency. An app icon should be opaque. If the icon’s
boundaries are smaller than the recommended sizes—or you use
transparency to create “see-through” areas—the resulting icon can
appear to float on a dark background, which tends to look especially
unattractive on the beautiful wallpapers that users choose.
Basically, it's going to look very wrong and bad. An option would be to choose a solid background field color for the app icon, and put the circle on that.

Resources