In my app I use a button and I assign two methods to them one is working when you touch down( the button image is changed), the other is working when you touch up inside (another view is opened). so simply, if you want to open a view you press the button but when you touch the button the image is changed and after you raise up your finger the another view is opened. My problem is if you press the button the image is changed, however if you move your finger somewhere away from the button touch up inside is not working as it supposed to be. But the problem is the image sticks with its over version because touch down is triggered once. what should I do? Thanks
Share
You can handle this in the control states
touchDragOutsideortouchDragExitdepending on exactly what you want it to do. UsingtouchDragOutsideyou can detect when the user touches down inside the button and drags their finger away without leaving the touchable bounds of the button, andtouchDragExitdetects when they drag outside the buttons touchable bounds.