I went through the apple doc too but it just states that its
Additional control-state flags available for application use.
Its just a getter method so when does it get set?
I went through the apple doc too but it just states that its
Additional control-state flags available for application use.
Its just a getter method so when does it get set?
Copyright © 2021 Jogjafile Inc.
applicationandreservedare basically markers. That is more clear when looking at the objective-c documentation for them:disabled:
UIControlStateDisabled = 1 << 1application:
UIControlStateApplication = 0x00FF0000reserved:
UIControlStateReserved = 0xFF000000That means that the second least significant bit of a
UIControlStatefor example is responsible for determining wether or not aUIControlis disabled or not. All the bits from17 - 24(from1 << 16until1 << 23) are there for your application to use while25 - 32(from1 << 24until1 << 31) are there for internal frameworks to use.That basically means that Apple is able / allowed to define new state flags of controls while using the lowest 16 bits, you have the guarantee to be able to use 8 bits for custom flags of your own.
Defining custom flags can be done e.g. via:
which can be used via