Updated 18 December 2016
Suppose you want that when you are typing a text on UITexfield its placeholder goes above, but this is not a by the default property of iOS. To use Floating TextField in iOS you have to use the JVFloatLabeledTextField library. You can download the JVFloatLabeledTextField library from this link (https://github.com/jverdi/JVFloatLabeledTextField).If you are creatingUITexfield from storyboard you have to pass the JVFloatLabeledTextField in the class If you are creating theUITexfield programmatically follow this code :-
1 2 3 4 5 6 |
let newsletterTextField = JVFloatLabeledTextField(frame: CGRect(x: 5, y: self.venY, width: SCREEN_WIDTH - 15, height: 50)) newsletterTextField.placeholder = "Profile Name" newsletterTextField.tintColor = UIColor().HexToColor(hexString: primary_color) newsletterTextField.text = self.profileNames[0] self.multivenderView.addSubview(newsletterTextField) newsletterTextField.tag = 2200 |
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.