UITabBar Image is not clear - ios

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.

Related

Button background alignment

I'm a long-time web dev trying to get into iOS development and Xcode so please forgive me for the simplest of questions.
I have a strange issue when I cannot centre align button text within a button's background image. Please see the screenshot below. At the moment you can see the text sits right aligned to the background image.
It’s not a background image. Think of it more like an icon.
It looks like you might want to set your Style to “Default”. Then it will show a background field under image

Main.storyboard is pitch black

I've been coding in Xcode for a long time but I've never used the storyboard. When I opened it up I got this pitch-black.
Does any one know how to fix this ?
A lot can cause a black screen. I think, most likely, you are currently previewing dark mode. You can switch back to light mode by clicking View as and changing the appearance.
Or, the background color of the view might be set to black (probably not the case though). You can change this in the attributes inspector.
Black color
System background color
System Background Color is white in light mode, and black in dark mode.
And there's always the possibility that Xcode is glitching. In that case, quit and relaunch.
For me, I had a datepicker set to inline mode, and it messed things up. I'd try and recall if you did anything that Xcode didn't like before it went black, and try and reverse that.

UINavigationBAr Title as an Image, used to work, doesn't display anymore in XCode9

I'm having a small annoying issue, I'm using storyboards on this app since it's creation, I want to make an update to it and something that used to work before doesn't anymore
See I was using an image as a UINavigationBar Title, Dragged it to the storyboard and it worked almost automatically,
Now well the image doesn't display anymore... Here's a screen :
As you Can see, the UIImageView is there, but nothing shows up. and when I run the app, still nothing...
I'd like to solve it trought Storyboards, but my knowledge is limited
thanks

How to access the system selected menu item blue color?

I'm working on an app that has a custom NSView on a NSStatusBar which performs all of the drawing when the user clicks it. But here's the problem, the color I'm currently drawing as the view's background color is not the same as the system blue color.
My app's color:
Twitter's menu item color (system):
As you clearly see, my blue color is way lighter than the system. This is the code I'm currently using (and worked perfectly on versions older than Yosemite):
[[NSColor selectedMenuItemColor] set];
NSRectFill(rect);
I've even tried color picking the menu item's color but it seems like the color is affected by the wallpaper below the menu bar.
Any ideas on how to achieve the system look?
As you said, in Yosemite, docks, status bars etc. are affected by whatever is behind them. Try enabling System Preferences > Accessibility > Display > Reduce Transparency and you'll see what your color looks like without this feature./
Here is an idea - Maybe you should use the Vibrancy effect and derive from NSVisualEffectView. I knew that I've seen a very similar thread somewhere here in the past, and it took me quite some time to find it. Here it is:
Trouble matching the vibrant background of a Yosemite NSMenuItem containing a custom view
I think Matthes' answer to that question would lead you to the resolution of your issue. Be sure to check it out. I hope it will help - Good luck and report back!

iOS 7 UISearchDisplayController not cleaning background when search data

I'm upgrading my Apps to iOS 7. Actually I have a big issue with UISearchDisplayController.
If i display it into a PopUp until I don't start a Search it works fine, but when I insert something into the SearchBar the search works fine, but I see the search result overlapped to the old contents.
In iOS 6 it all works fine. Here is a link to an example project which shows the problem.
Example project
Attached to this post there are two images.
Thank you for your help.
Seems like the cell's background color is clear color, and so is the table view's. You can either implement the search display controller's delegate method searchDisplayController:didLoadSearchResultsTableView: and set the background color to what you need (but not [UIColor clearColor]). Or change your cells' background color to be an opaque color.

Resources