简体   繁体   中英

How to preload text value into SkyFloatingLabelTextField

I am currently using SkyFloatingLabelTextField and have the following code.

var textFieldLastNameSignUp: SkyFloatingLabelTextField!

textFieldLastNameSignUp.placeholder = "Family Name"
textFieldLastNameSignUp.title = "Last Name"

Based on this it shows a single line in the app loaded with 'Family Name'. The moment I click into the field, the 'Family Name' text goes away and the title 'Last Name' shows above the entry.

I would like to show both 'Family Name' in the entry line and 'Last Name' in the title at the same time. How do I accomplish that?

These two things did the magic.

This forced the title to be visible textFieldLastNameSignUp.setTitleVisible(true)

This forced the text box to accept the text textFieldLastNameSignUp.insertText(self.userLastName)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM