iOS Question Problem mit B4XCanvas or iPhone-X ?

D

Deleted member 103

Guest
Hi,
attached is a test project with B4XCanvas. Only one arrow is drawn here.
1) test with iPhone-X
When the app starts, the arrows are visible, after a change to Page-2 and back to Page-1, the arrows are no longer visible.

2) Test with iPhone 6 and iPad mini
When the app starts, the arrows are visible, after a change to Page-2 and back to Page-1, the arrows are always visible.

Is this a Canvas problem or does my iPhone X have a problem or am I doing something wrong?

canvastest_iPhone-6.png


canvastest_iPhone-X.png
 

Attachments

  • Canvas-test.zip
    5 KB · Views: 149
D

Deleted member 103

Guest
Why are you initializing the canvas multiple times?

Initialize it once when the app starts and change Page1_Resize to:
B4X:
Private Sub Page1_Resize(Width As Int, Height As Int)
   cvsArrow.Resize(pnlCrono.Width, pnlCrono.Height)
   CreateArrow(0)
End Sub

Don't resize it in other places.
Unfortunately, the change brings no improvement, the error remains. :(

Does anyone have an iPhone-X with which he can reproduce the mistake?
 
Upvote 0
D

Deleted member 103

Guest
Hi Erel,

here is the modified project.
 

Attachments

  • Canvas-test_02.zip
    5 KB · Views: 142
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I see the behavior you are describing. It looks like a caching issue related to ImageView. It will work properly if you initialize the canvas with the underlying panel instead of an ImageView.

I will further check it. Use a panel for now (all custom views that use a canvas are drawing on panels).
 
Upvote 0
D

Deleted member 103

Guest
Use a panel for now (all custom views that use a canvas are drawing on panels).
Thanks Erel, it works well with panel.
Can it be a problem with iOS-13?
 
Upvote 0
Top