iOS Tutorial FloatLabeledEditText (iUI8)

Discussion in 'iOS Tutorials' started by Erel, Feb 29, 2016.

  1. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

    iUI8 v1.20 includes a new view named FloatLabeledEditText. It is a modified TextField that instead of hiding the hint text when the text field is non-empty it moves it to the top.

    It is implemented as a custom view. You just need to a reference to iUI8 library and then add the view with the designer (it will appear under CustomView menu).

    It is based on this open source project: https://github.com/jverdi/JVFloatLabeledTextField

    Note that you need to add #MinVersion: 8 when using iUI8 library.
     
    Mashiane and narek adonts like this.
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    I think you should add this port in the Git page of this wrapper in the section
    Ports and Alternate Implementations
     
    Erel likes this.
  3. moore_it

    moore_it Active Member Licensed User

    hi Erel, the type remain textfield ?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    No. It is FloatLabeledTextField.
     
  5. moore_it

    moore_it Active Member Licensed User

    Ok. It's wonderful but it's possible to have a password FloatLabeledTextField ?
    Thanks
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Yes. You can set the PasswordMode to true (in your code).
     
    moore_it likes this.
  7. moore_it

    moore_it Active Member Licensed User

    Great !

    TKS !
     
  8. cloner7801

    cloner7801 Active Member Licensed User

    I set FloatLabeledEditText alpha to 0 and in code I use alpha animated
    but it didn't work
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Change the alpha of BaseView.
     
    cloner7801 likes this.
  10. AndOrNot

    AndOrNot Well-Known Member Licensed User

    Is possible to set hint text color?
    Another issue, when i try to change view dimension, it doesnt work
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    You need to change the position of FLV.BaseView.

    You can change the active and inactive colors with this code:
    Code:
    Dim no As NativeObject = FloatLabeledTextField1
    no.SetField(
    "floatingLabelActiveTextColor", no.ColorToUIColor(Colors.Red))
    Dim s As AttributedString
    s.Initialize(
    "hint text here"Font.DEFAULT, Colors.Blue)
    no.RunMethod(
    "setAttributedPlaceholder:"Array(s))
     
    AndOrNot likes this.
Loading...