Giter Club home page Giter Club logo

animatedfield's People

Contributors

alberdev avatar am33t avatar dineybomfim 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

animatedfield's Issues

alertFont not available

I am trying to set a font for an alert label but it is showing me the error that it is not available. I have checked in the demo, that animatedField has alertFont but in my project, I am not able to find alertFont in animatedField file. Kindly help asap.

Fails for iOS Text Replacements

I was able to fix it by changing AnimatedField+TextFieldDelegate.switch, line 39:

let typingExpression = "(type.typingExpression)+"

The regex expression appears to be limited to only a single character, so multiple character replacement strings fail the regex check.

Scroll View issue for "Multiline" type

Hey, great product! I'm trying to use the multiline type, and I'm having trouble getting it to work inside a scrollView. When I add it as a subview, the AnimatedField view no longer responds to touch events. Do you know what the problem may be? What's the correct way of doing this?

Is there a textFieldDidChange delegate method?

Is there a delegate method for textFieldDidChange, which is called whenever the text field in the AnimatedField changes? The documentation mentions func animatedField(_ animatedField: AnimatedField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool? which seems to work very similarly, but I was curious if there is a separate didChange method.

func textFieldDidChange(textField: UITextField) {
    //your code
}

Title changes color when deselect text field.

I have set titlealwaysvisible property to true and given title color to yellow. When I am selecting a text field and deselect it, it becomes grey when I have already set title color to yellow.

Can you please allow us to add version while installing pod because the demo code doesn't have that issue. if we can install pod to that particular version then it would be helpful.

UITextView text jamping

After starting editing, the text jumps to the bottom line.

animatedField.type = .multiline animatedField.text = "placeholder" animatedField.format.titleFont = UIFont.systemFont(ofSize: 12, weight: .regular) animatedField.format.textFont = UIFont.systemFont(ofSize: 17, weight: .regular)

Screen Shot 2020-04-10 at 20 56 16

Error text hovers over placeholder text

Reproduction steps

Using v2.0.0

import AnimatedField

....

lazy var usernameTextField = AnimatedField()
let textInputFormatting: AnimatedFieldFormat = {
    var format = AnimatedFieldFormat()
    format.titleAlwaysVisible = false
    format.titleFont = UIFont.systemFont(ofSize: 13, weight: .regular)
    format.titleColor = UIColor.lightGray
    
    format.textFont = UIFont.systemFont(ofSize: 16, weight: .regular)
    format.textColor = UIColor.darkGray
    
    /// Font for counter
    format.counterFont = UIFont.systemFont(ofSize: 13, weight: .regular)
    format.counterColor = UIColor.darkGray
    
    format.lineColor = UIColor.lightGray
    
    format.alertEnabled = true
    format.alertFont = UIFont.systemFont(ofSize: 13, weight: .regular)
    format.alertColor = UIColor.red
    format.alertFieldActive = true
    format.alertLineActive = true
    format.alertTitleActive = true
    format.alertPosition = .top
    
    /// Enable counter label
    format.counterEnabled = false
    format.countDown = false
    return format
}()

usernameTextField.format = textInputFormatting
usernameTextField.placeholder = "Username".localized()
// add to view
....

private func isUserNameValid() -> Bool {
    let enteredUsername = usernameTextField.text ?? ""
    if (enteredUsername.isWhitespace) {
        usernameTextField.showAlert("Email cannot be blank")
        return false
    }
    if (!enteredUsername.isValidEmail) {
        usernameTextField.showAlert("Invalid e-mail address")
        return false
    }
    usernameTextField.showAlert("")
    return true
}

Before Error

before

After Error

Error messages covering the text entered:
after

Expected Behavior

The placeholder goes away when showing an error message

Platform

  • Device: iPhone Xr
  • OS: 12.2

Inconsistent when creating programmatically

Problem 1: Setting text property makes the title to not appear even when titleAlwaysVisible is set to true

Problem 2: Setting placeholder attribute of .multiline puts the placeholder as text instead of a placeholder, making the user having to delete the characters

I'm using your example but just creating fields with code.

Hangs the app

Its just hangs my whole App as soon as I start typing.

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.