iOS 7 BarTintColor - user-interface

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.

Related

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 have individual selected image color for TabBarItem

I've been through most to all of these SO Q/A and none of which worked; many refers to older version of xcode.
I'm using Xcode 8. I have a TabBarItem with a red image. Other item image will have a different color. For the first item, the selected image is originally red. When I run the app, it's blue -- it should be selected as red, why it's blue?
In Story Builder -> Identity Inspector -> Runtime attr, I have tintColor - Color - (red color). None of that worked. My image is red so why it's not red? Do I need to disable a default setting somewhere?
Is there a way when I select any image, it shows the original color it was saved?
A post's comment mentioned setting the image in viewDidLoad is bad. Is that true? I've tried that and it's still selected blue.
This question is about selected image.
Thanks
When I run the app, it's blue -- it should be red, why it's blue?
That's because blue is the tint color. If you want to use the red of the original image, and not the tint color, turn the image into a rendered image with rendering mode alwaysOriginal. If this is supposed to be the color only when the tab bar item is selected, supply it as the selectedImage.

Access Default Window Color Cocoa

I have an SKView with a picture of a keyboard in a window as shown below. I would like the background color of the SKScene it's presenting to be the same color as the window behind it, so that it would appear as if the keyboard was just in the window, and not in something else that was in the window. After consulting the NSColor documentation, I tried setting the background color of the SKScene as NSColor.windowBackgroundColor(). The color below is what I got. I'm assuming there was some kind of error and so it defaulted to black. That being said, how do I access the default color of a window?
Set the SKView's allowsTransparency to true and then set the SKScene's backgroundColor to NSColor.clearColor().
I think that using windowBackgroundColor() gives black if the view doesn't allow transparency and works if it does because it's effectively being translated to clearColor() by "accident". windowBackgroundColor() is a bit strange. It's not in either an RGB nor a gray-scale color space and it can't be converted to either of those. I'm guessing that SKScene tries to convert the background color to the RGB color space and, when that fails, it uses clearColor() as a fallback.

button on the NAV BAR is the wrong colour

I have got a navigation bar with a controller. I want an 'hamburger' icon on the right bar button.
Its an PNG file.
When I add it on Interface builder its blue :(.
I have been messing with the Tint colour and that changes the whole image. So if I want it green i just change the Tint color. But I want the colour to come from the png and not from the tint. I have tried using clear tint colour and that just makes it disappear. Any ideas on this quick one ?
You can't change the color with the PNG. As Apple says here:
If you create a full-color template image, iOS ignores the color.
So you have to change it in the storyboard or programmatically, like this:
Tab Bar:
UITabBar.appearance().selectedImageTintColor = UIColor.orangeColor()
Navigation Bar:
UINavigationBar.appearance().tintColor = UIColor.orangeColor()

LongListSelector Foreground Color

Have been searching through here with no luck, Pretty simple problem, On my emulator all font colors are white (which is what I want).
Testing on a device the fonts are all black now, I have managed to change this by setting the foreground colors on the elements however I am unable to do so on the longlistselector through code.
This works for me:
longListSelector.Background = new SolidColorBrush(Colors.Transparent);
However this has no effect:
longListSelector.Foreground = new SolidColorBrush(Colors.White);
Any other way I can attempt to set the text color on the longlistselector?
The reason foreground colors would be different would be because of the default style. PhoneAccentBrush changes based on if your "phone" is set to have a white background or a black one.
The reason why your longListSelector.Foreground is not working may be because the phoneaccentbrush is set on the items inside the longlistselector from a style?

Resources