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

Thursday, September 29, 2022

[FIXED] How to change white background when UISegmentedControl focused?

 September 29, 2022     swift, tvos, uifocusguide     No comments   

Issue

I try to change white background color in segment if UISegmentedControl gets focus. Please look the folowing screenshot: enter image description here

And I need to change this white background color into clear. Something like this: enter image description here

So I've created subclass of UISegmentedControl and ovveride didUpdateFocus(in:with:) Look please the following screenshot: enter image description here

But after that focus doesn't change anymore and I can't jump to next segment of UISegmentedControl.

I saw similar question here, but I wasn't succeed of it.

It's tvOS and deployment target is 11.1.

Why is that? What is the better approach to change background color when focused? Please help me.


Solution

I fixed this problem by replacing UISegmentControl to UICollectionView.



Answered By - Taras
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