Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of UIControlStateSelected

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

like image 257
Morrowless Avatar asked Dec 02 '25 09:12

Morrowless


1 Answers

In the instance that a button, etc. is selected or pressed. A lot of people use that particular one to change images on the object to show a selected state for the brief moment when it is selected.

I have also used it in tables to make it easier to re-use cells by checking for selected states and updating the table cell based on if it's selected or not.

like image 125
iwasrobbed Avatar answered Dec 05 '25 09:12

iwasrobbed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!