iOS Question push button, color doesn't change

electro179

Active Member
Licensed User
Longtime User
I have a strange effect

If there is a button in the bottom screen and I push the event is called but the text doesn't change the color. On the same button, a little higher the color changes

here a video:

 

electro179

Active Member
Licensed User
Longtime User
This project shows the problem.

There only 1 button
Each click call the event anywhere on the button but the color text doesn't change when I click at the bottom button
 

Attachments

  • color text.zip
    2.1 KB · Views: 179
Upvote 0

electro179

Active Member
Licensed User
Longtime User
I make a new video on IPAD V.9

I have also a iphone 4 with IOS V. 7

There is a disabled area of 7 millimeter, along the entire length of IPAD/IPHONE
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
sorry but I don't understand

there is no issue with the bottom of the button, the issue is with the bottom of the screen.
when i put a very big button on my screen but the bottom of it is 10% up from the bottom of the screen, short clicks work perfect only if i put the button
bottom to the bottom of the screen only long click works.

i also put a small size button and the same behaver. i tried on the simulator ios 9.2 and there it works also on the bottom but on a real phone short (fast clicks)
does not work on the bottom of the screen (also on a small button and even if you click on the centre of the button)

i think erel is right, apple ignore clicks on the edges of the screen.
 
Upvote 0

strat

Active Member
Licensed User
Longtime User
Use this code to see click point accuracy on IOS devices. I used panel instead of button. You can test whole screen area by this code.


B4X:
Sub Process_Globals
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Private panel1 As Panel
    Private x1,y1,x2,y2 As Int
    Dim c As Canvas
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Tap the Screen"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
    panel1.Initialize("panel1")
    Page1.RootPanel.AddView(panel1,0,0,100%x,100%y)
    panel1.Color=Colors.White
    c.Initialize(panel1)
End Sub

Sub Panel1_Touch(Action As Int, X As Float, Y As Float)
    Log(X&"  "&Y)
    x1=X
    y1=Y
    c.DrawLine(x2,0,x2,100%y,Colors.White,2)
    c.DrawLine(0,y2,100%x,y2,Colors.White,2)
    c.DrawLine(x1,0,x1,100%y,Colors.Red,2)
    c.DrawLine(0,y1,100%x,y1,Colors.Red,2)
    x2=X
    y2=Y
    c.Refresh
End Sub
 
Upvote 0
Top