UIImageView Tint Color weirdness - uiimageview

I'm using pdf images in Xcode 10.
The settings are as follows:
As you can see the image has been set to be rendered as Template Image
Now when setting the image in an imageView and setting the tint color, this weird thing happens:
If the tint color is not white or any white hue, it is rendered correctly on the phone
If the tint color is set to white or any hue that is white (light gray, etc), then it's rendered fine in the Interface Builder, but it appears black on the phone
I even tried setting the tint color at runtime, but same thing happens.
Any clues why this is happening?
I'm starting to think this is a bug in Xcode, but wondering if I missed something!

Ok, this seems to be indeed a bug.
Found this:
http://openradar.appspot.com/23759908
And yes, calling tintColorDidChange in viewWillAppear does solve the problem.

Related

Is it even possible to make NSPopver fully transparent?

I tried my hands on changing the color of NSPopover, I am able to change to it all desired color except transparent.
As, it is known that NSPopover is by default semi transparent. I tried changing the NSWindow color directly, by Layer as well, I also tried setting the NSView's color to transparent i.e. NSColor.Clear but no luck.
So the question is - Is this possible to change the background color of NSPopover to transparent?
No this is (sadly) not possible.

Why does my NSBox draw a background? (boxType = .primary)

I realized that suddenly (without me touching the corresponding code) my NSBox has a double visualization. It is as if the Box has a background color and draws its normal rounded frame inside. I added a small screenshot. The parent control is white, the NSBox is gray with the title "Inputs" (unchanged titlePosition). Under the title is the normal box, adding a 2nd shade of gray.
I did not change any of the usual suspects, especially not boxType which is still set to .primary.
I did work on the Dark Mode (Dark Aqua) but cannot see any change that would cause this behaviour. effectiveAppearance is still Aqua.
A NSBox with a boxType of .primary always draws a background. That is intended behaviour. Only if the view behind NSBox is white you may not see it. If you want a NSBox without background you must make it boxType .custom and set the background color as required.

How to "tint" UIVisualEffectView on iOS 8+? Or, create a blurred background view with a tint color?

Self-explanatory. UIVisualEffectView only has a light, dark, and "extra light" tint variation. Is there a way to tint with a color instead, such as the tint color of the app?
UINavigationBar sort of does this, I think, in that it has transparency and blur... but also a tint color.
Third-party libraries are OK, but I'm not sure where to look for this.
You can tint the UIVisualEffectView using this library:
https://github.com/efremidze/VisualEffectView
Set a UIView with an alpha of 0.5 or so with a background color. In front of that put a UIVisualEffectView. Remember to not set the visual effect view as a subview of the first background view.
That should do the trick.
It seems like FXBlurView is the way to go currently for tinted blurs. https://github.com/nicklockwood/FXBlurView
You could maybe put it in a UIView that had a semi-opaque background color of the opacity to your liking...

Is there a way to change the background color of the xcassets view in Xcode 5 or Xcode 6?

Is there a way to change the background color of the xcassets view in Xcode 5 or Xcode 6?
I have white images that are lost on the white background.
When viewing an image without using xcassets, the image is set against a grey background.
However with xcassets the background is white and the images can't be seen.
I've tried using different different font and color schemes but they only seem to apply to the text editor.
A reasonable work around is to select the image asset, (eg click on the 1x or 2x version) and then press the spacebar.
This will show the asset in a popover with a light grey background.
If you are happy to add an Xcode plugin (it's available via Alcatraz) then
TOCAssetCatalogBackground solves this problem. https://github.com/toco/TOCAssetCatalogBackground
Are the images essentially silhouettes? If so, you could make them in another color (I like to use magenta, because then it’s immediately clear when something isn’t working). Then you can use iOS 7’s -[UIImage imageWithRenderingMode:] (not sure if there is a Mac equivalent) to have the image automatically pick up the tint color of its containing view. Then you would not be looking at white images on a white background.

iOS 7 BarTintColor

Have any one else noticed in iOS7, the translucent navigation bar only shows color underneath if barTintColor is set to default?
I tried setting barTintColor to various different colors, but anything that is below the navigation bar is displayed a a black blur. Whereas if the barTintColor is set to default, all the elements display correctly underneath.
Is there a way to force it to show the correct colors?
You have to use background color instead of tint color.
self.navigationController.navigationBar.backgroundColor = [UIColor yellowColor];
If you are using tint color it changes only barbutton background color change.
In MyTabBarController in the storyboard select the color tint. You will change the button active color background. No idea for the inactive one.

Resources