Imagine your keyboard. Imagine placing one finger down on one key, then (holding), moving your finger to the other key on the keyboard. Now imagine each key on the keyboard UIButton. when you hold your finger on the current key, this key ( UIButton) is highlighted. Then, when the user moves to another key, the first key is no longer highlighted, and the current key that is pressed is highlighted.
Now I have a 6 x 8 UIButtons grid each 53 x 53 pixels. So I have 48 UIButtons. I want to reproduce this idea. The button on which the user's finger is turned on will have an image that is slightly lighter (to look similar), and all the others will be slightly lighter.
Here is my idea how to do this,
1) Create all 48 UIButtonsin viewDidLoad. Add a lighter image in UIControlStateHighlightedfor everyone UIButtons.
2) Add a kind of targetfor touchUpOutside, which somehow makes the current button unlit and unusable. (maybe for selected ones and userInteractionEnablednot). But then how can I say the next button to be used? And how can I say that I want a particular UIButtonone so that the fingers of users are underneath to be highlighted and used to detect gestures and more.
Also, this method touchUpOutsidemay not work because all buttons are next to each other, and I think you need to go a long way to launch this one touchUpOutside.
, . UIImage, UIButton. , - - .