iOS Question Keyboard, Change language event

Discussion in 'iOS Questions' started by Shay, Mar 3, 2015.

  1. Shay

    Shay Well-Known Member Licensed User


    I have strange issue on ios 8 which I cannot replicate on ios 7
    I have 1 TextFeild that I am using this code for pushing it up, so you can see what you type
    Sub Page1_KeyboardStateChanged (Height As Float)
    If Height = 0 Then
            Page1.RootPanel.Top = 
    For Each V As View In Page1.RootPanel.GetAllViewsRecursive
    If IsFirstResponder(V) Then Page1.RootPanel.Top = Min(0,Page1.RootPanel.Top - (Height - (Page1.RootPanel.Height - (V.Top + V.Height + 60))))
    End If
    End Sub
    issue is (saw it live on someone phone)
    once keyboard is coming up, if you press the change language button, each press is pushing all objects up, so after 3 switches, you cannot see anything on screen anymore

    I tried to replicate on my ios 7 - does not happen, and I think it is related to the above code
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    I think that the issue is that on each KeyboardStateChange you must subtract each time from 0.

  3. Shay

    Shay Well-Known Member Licensed User

    What do you mean?
  4. Erel

    Erel Administrator Staff Member Licensed User

    Change Page1.RootPanel.Top to 0.
  5. Shay

    Shay Well-Known Member Licensed User

    Thanks, I removed the "if height=0"
    issue resolved
  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