How to create a UIButton for tvOS with a clear background color? - tvos

I'm trying to create a UIButton of System type with a clear background color. The problem is that it shows a gray background color even if I set it to clearColor. I can do it with a Custom type UIButton, but then the button loses the default effects for focusing and selection.
Does anyone knows how to create a System UIButton with a entirely transparent background?

Since tvOS 11 there is a solution for that using the button type "plain" instead of "system" without loosing the effects for focusing and selection:
Open the button properties in the Interface builder an select "Type"->"Plain"
Set the button background color to "clear color"
Thats it.
Watch Apples Video about "UIButtonTypePlain" here (starts at 13:44):
UIButtonTypePlain explained

In storyboard Attributes Inspector you have to change button type System to Custom.

Related

Interactive Image/Graphic in React/Html

Im fairly new to react/html and im trying to make an interactive Graphic/Image, such that when a mouse hovers over a circle it highlights a colour and when i click it turns to a colour. Is it possible to do this? Can i get some advice on how its possible to do this without hardcoding different images to load once one (or more) have been clicked.
Thanks Heaps!
First you create a circle Component
with onMouseEnter and onMouseLeave methods to change the display color when mouse enters and leaves the circle Component
and then you can use an onclick method to change the color when it is clicked.

change tvOS tab bar focus color

I created an appleTV app on tvOS 13! and I'm faced with some tabbar customization problems.
I want to change the focused item color, I can change the text color, but I can't change the white focus background!
And also the tabBar add an alpha to 0.5 on not selected image how to remove it?
Thanks
On tvOS 13 you need to access the standardAppearance to change it:
tabBarController?.tabBar.standardAppearance.selectionIndicatorTintColor = UIColor.red

How to choose a color on a palette to change part of an image?

I don't even know where to begin or what codes will be needed.
I'm trying to build a website that allows the user to change a certain part of an image's color. Just like a coloring book page online, where someone can choose a color from the palette and it will allow them to click on that part of the image to change it to that color. Once they are done they can save the image to their computer.
Any help in the right direction would be incredible!
You can try to make a transparent div over a div containing the image which is in absolute position of the div containing the image.
Then you can check some javascript plugin to get a color picker plugin.
With Javascript and for example jQuery, you can add some events on click on the color picker and then on click of the div which is hover the image to apply the picked color.
I hope this is clear for you, otherwise I can make a JSfiddle

How to find a specific html color code?

I have buttons with a color for each state :
state enable : #007BC2
state disable : #428bca (pale version of enable color)
This css is a file I have picked from a template.
Now my client wants for the button this enable color : #4B0082.
I want to find the color code for the pale version of #4B0082 (for the disable state).
Is there a css tool on the web to find this color or do I need to browse a color picker to find the "pale" version of this enable color?
Thanks for your answers.
I suggest using chrome or firefox. Here you can right-click any element on your webpage. For your example: right click the button and click 'inspect element'. You can now see the developer tools window. Here you can see all the css or html attributes for your button.
So take a look at the background-color attribute and click the color thumbnail. A color picker becomes visible (see screenshot) . You can now choose the color and see a live preview of that color in your web page.
You can use Colorzilla (chrome add-on) to pick color from page and to find its pale version.It also contain option of generating css gradient and even get history of your picked color
You will find colorzilla on chrome webstore

Color format switcher is not working

With latest Chrome (43) cycling through color formats on color swatch click in DevTools' Styles has stopped working. The only way I can switch formats now is to change them manually in options. Is there a way to get back this feature without extensions?
The behavior seems to be changed, now you need to shift+click the color swatch instead of simple click. Thanks #Superfy.