PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, September 29, 2022

[FIXED] How to create a UIButton for tvOS with a clear background color?

 September 29, 2022     apple-tv, tvos     No comments   

Issue

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.

Appearance of the System UIButton with a clear background color

Does anyone knows how to create a System UIButton with a entirely transparent background?


Solution

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:

  1. Open the button properties in the Interface builder an select "Type"->"Plain"Button Properties

  2. Set the button background color to "clear color"

Thats it.

Watch Apples Video about "UIButtonTypePlain" here (starts at 13:44): UIButtonTypePlain explained



Answered By - Jochen Holzer
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing