Touch in lower corner of iPad pro misbehaves

@dave1707 Thank you! Your code is working. But I want sprite to change when I click it. Like a “push” action. And then after ENDED it must back to normal…

Btw, Did my code worked at your devices?

The thing is, that all print commands and functions work perfectly wherever I touch, but sprite not changing… only when I press with two fingers or on the right upper corner of the button.

@Compozitor I think I found your problem with touching a button near the bottom of the screen. With one of the iOS updates, if you swipe up from the bottom of the screen, the app dock shows. What happens with Codea, the touch doesn’t work properly below 25 pixels. What I see with the program below is, if I touch the red area, the BEGAN touch isn’t recognized. If I touch in the white area, the BEGAN touch is recognized after about 3/4 second. The BEGAN touch is recognized in both areas if I move my finger. @Simeon Is this an iOS problem or a Codea problem.

displayMode(OVERLAY)

function setup()
end

function draw()
    background(40, 40, 50)
    fill(255)
    rect(WIDTH/2,0,WIDTH,25)
    fill(255,0,0)
    rect(0,0,WIDTH/2,25)
end

function touched(t)
    if t.state==BEGAN then
        tx=t.x
        ty=t.y
        print("began  y= ",ty)
    end
    if t.state==MOVING then
        print("moving  x= "..tx.."  ty="..ty)
    end
    if t.state==ENDED then
        print("ended")
    end
end

@Compozitor I modified my code a couple of discussions above that changes the color of the button when pressed. I made the buttons larger and moved them above the 25 pixel area that’s causing a problem.

@dave1707 I tested your code! Yeah I think it was the problem!
But I cannot touch them on the sides on my iPad 10.5” without moving buttons ~10-13 pixels from borders…

Thank you for your help, founding what’s wrong!

About which problem is that… I would be glad to hear it also! And maybe fix it:) Of course I can draw some kind of border there…

@dave1707 Just played Grim Fandango Remastered on my iPad Pro 10.5”… It seems that it’s a iOS problem. I cannot touch sides and bottom.