iOS Question view.SetLayoutAnimated problems

Discussion in 'iOS Questions' started by F.Campanella, Jun 22, 2015.

  1. F.Campanella

    F.Campanella Member Licensed User

    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
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    Why don't you use ScrollView for this?
    F.Campanella likes this.