Git Product home page Git Product logo

floatlabelfields's People

Contributors

fahimf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

floatlabelfields's Issues

Make placeholderTextColor settable

I'd like to change the placeholderTextColor but it's a constant not an inspectable variable like titleTextColour. This is what I desire. :)

    @IBInspectable var placeholderTextColor:UIColor = UIColor.lightGray.withAlphaComponent(0.65) {
        didSet {
            if !isFirstResponder {
                hintLabel.textColor = placeholderTextColor
            }
        }
    }

hintLabel not positioned correctly when view appears

I'm seeing an issue with FloatLabelTextView where the hintLabel is positioned too far down and thus clipped off until you input text into the text view. You can delete the text and it'll still appear as expected. I haven't changed the hint/title y padding. I did disable scrolling to allow it to expand in height via auto layout, not sure if that is related.

screen shot 2017-07-03 at 4 57 22 pm

View controller loads slowly !!

The view controller loads slowly because of using FloatLabelFields at 7 places in the VC. I searched for different solutions but none worked. Any help guys.
I have been using the same classes as provided

Thanks

Swift 4.2 support

There are a bunch of errors when compiling with Swift 4.2 due to UIKit symbols being renamed. Is there a Swift 4.2 branch ready yet?

placeHolder color

Hi, everything works like a charm. Except that I cant change my placeholder text as I usually do.

override var placeholder: String? {
    willSet(value) {
        super.attributedPlaceholder = NSAttributedString(string: value!, attributes: [NSForegroundColorAttributeName : UIColor.whiteColor(), NSFontAttributeName : self.font])
    }
}

Any ideas?

Center Alignment of Text in FloatLabelTextField misplaces title

The bug is that center aligning in the textfield misplaces the title/placeholder.
But, it worked for the FloatLabelTextView.

As I didn't want to spend much time reading the logic for title placement, I just compared the setTitlePositionForTextAlignment functions in FloatLabelTextField.swift and FloatLabelTextView.swift.

Here is the fix in case anyone is looking for it:

private func setTitlePositionForTextAlignment() {
        let r = textRectForBounds(bounds)
        var x = r.origin.x
        if textAlignment == NSTextAlignment.Center {
//          x = r.origin.x + (r.size.width * 0.5) - title.frame.size.width <-- **comment out this line and add the next line.**
            x = (frame.size.width - title.frame.size.width) * 0.5 // <-- add this
        } else if textAlignment == NSTextAlignment.Right {
            x = r.origin.x + r.size.width - title.frame.size.width
        }
        title.frame = CGRect(x:x, y:title.frame.origin.y, width:title.frame.size.width, height:title.frame.size.height)
    }

Initializer does not override a designated initializer from its superclass

I am using swift 1.2
UITextView's designated initializer is

    // Create a new text view with the specified text container (can be nil) - this is the new designated initializer for this class
    @availability(iOS, introduced=7.0)
    init(frame: CGRect, textContainer: NSTextContainer?)

replace

    override init(frame:CGRect) {
        super.init(frame:frame)
        setup()
    }

with

    override init(frame: CGRect, textContainer: NSTextContainer?) {
        super.init(frame: frame, textContainer: textContainer)
        setup()
    }

Placeholder Animation

Is it possible to animate the placeholder when the text field is clicked rather than when user starts typing the text

How to give cornerRadius to your class?

I tried to set the corner radius for the textfield programatically. But its not affecting for your class field. Can you check and suggest?
Thanks and Regards
Aditya B

Carthage

Would you consider adding Carthage support?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.