iOS Question view.SetLayoutAnimated problems

F.Campanella

Member
Licensed User
Longtime User
Hi,
I have a panel that is 500% width to the screen width.

through buttons I move the panel left and right with SetLayoutAnimated. If I repeat this events more than 8-10 times, the movement stops working. Only with the restart of the application movement resumes operation, but after 8-10 times that I move the panel the problem returns.

Can you help me?

The code of the click button is below.
The last line of code, I visualize the value of the left property of the panel and after 8-10 times actually remains fixed.

Sub Page1_BarButtonClick (Tag As String)

Dim Offset = 0
Dim OldPageActive = PageActive

If Tag="btnNews" Then
Page1.Title = "MeteoCastellana - News"
PageActive = 1
Else If Tag="btnPrev" Then
Page1.Title = "MeteoCastellana - Previsioni"
PageActive = 0
End If

If PageActive <> OldPageActive Then
pnApp.SetLayoutAnimated(1300, 0.9, (-PageActive)*OffsetX, 0, 500%x, 100%y)
pnApp.Left = (-PageActive)*OffsetX
End If

Hd.ToastMessageShow(PageActive & " " & OffsetX & " " & pnApp.Left, True)

End Sub
 
Top