iOS Question Identify when Scroll changed End

Discussion in 'iOS Questions' started by Luiz Fernando Orlandini, Feb 25, 2015.

  1. Luiz Fernando Orlandini

    Luiz Fernando Orlandini Active Member Licensed User

    I need to identify when the scroll changed event ends, to launch a new action.

    In b4a, it's possible to do with a timer, using reflect library, but in B4I we don't have this library.

    How can I identify when scroll changed event has ended to launch a new action.

    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The attached class wraps a ScrollView and uses a timer to raise the event after the user stopped scrolling it.

    Usage example:
    Code:
    Sub Process_Globals
       
    Public App As Application
       
    Public NavControl As NavigationController
       
    Private Page1 As Page
       
    Private sv As MyScrollView
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
       NavControl = Nav
       Page1.Initialize(
    "Page1")
       Page1.Title = 
    "Page 1"
       Page1.RootPanel.Color = 
    Colors.White
       NavControl.ShowPage(Page1)
       sv.Initialize(Me, 
    "sv")
       Page1.RootPanel.AddView(sv.InnerSV, 
    00100%x100%y)
       sv.InnerSV.ContentHeight = 
    200%y
    End Sub

    Private Sub Page1_Resize(Width As Int, Height As Int)
       sv.InnerSV.ContentWidth = 
    100%x
    End Sub

    Sub sv_ScrollChanged
       
    Log("scroll changed")
    End Sub
     

    Attached Files:

  3. Luiz Fernando Orlandini

    Luiz Fernando Orlandini Active Member Licensed User

    Cool!!! Works fine!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice