dirkfabisch / b68floatinglabeltextfield Goto Github PK
View Code? Open in Web Editor NEWSwift implementation of the Float Label Design Pattern from Matt D. Smith
License: MIT License
Swift implementation of the Float Label Design Pattern from Matt D. Smith
License: MIT License
Hi,
I am trying to use your pod but not able to lazy load it..
I am not able to do
var textField = B68UIFloatLabelTextField()
but I had to do
var textField = B68UIFloatLabelTextField(coder: NSCoder.empty())
and further had to write an extension of
extension NSCoder {
class func empty() -> NSCoder {
let data = NSMutableData()
let archiver = NSKeyedArchiver(forWritingWithMutableData: data)
archiver.finishEncoding()
return NSKeyedUnarchiver(forReadingWithData: data)
}
}
Can you please update it to use the default init method
If you add a floating label text field to a tableview cell and add about 20 or so of them, so that they are off the screen. when tableview reuses cells, it still shows floating label even for the textfields that have no text.
I've fixed the issue, but i'm having issue make a pull request.
This is where the issue is:
override public func layoutSubviews() {
super.layoutSubviews()
if (isFirstResponder() && !hasText()) {
hideFloatingLabel()
} else if(hasText()) {
showFloatingLabelWithAnimation(true)
}
}
just change it to:
override public func layoutSubviews() {
super.layoutSubviews()
if ((isFirstResponder() && !hasText()) || !hasText()) {
hideFloatingLabel()
} else if(hasText()) {
showFloatingLabelWithAnimation(true)
}
}
Sasa
I would like to request overlay view support. In other words, I'd like to be able to add a leftView
and have the floating placeholder text place it self appropriately.
Hi,
What do you think about add option to install this kit via Carthage? I would like to use it this way. Thanks
Hello Sir, @dirkfabisch
Can you make UITextView
with same features of B68FloatingLabelTextField
?
I have tried, but didn't achieve success yet.
Thanks.
Hi, I recently stumbled upon your customized Text Field and I wanted to see how it works. However, I can't seem to make it work in my project as I get an error saying Use of undeclared type 'B68UIFloatLabelTextField'
when I try to make an IBOutlet
of this type. I installed the project via Cocoapods
which worked and tried to follow your example but I can't seem to get this working. If it helps I'm making a Swift project. Do I need to import anything or add the file anywhere? Thanks for your help.
Hi,
Could you add the support of swift 2.1 please ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.