Purpose UIControlStateSelected

Three other UIControlStates are clear to me, but I cannot understand the purpose of UIControlStateSelected. What / when does a UIControl subclass enter this state?

+3
source share
1 answer

In the event that a button is selected or pressed, etc. Many people use this particular option to modify images on an object to show the selected state for a brief moment of its selection.

I also used it in tables to simplify cell reuse by checking selected states and updating a table cell based on if it is selected or not.

+4
source

Source: https://habr.com/ru/post/1749428/


All Articles