Code Monkey home page Code Monkey logo

Comments (9)

julien-tamade avatar julien-tamade commented on June 19, 2024 1

Hi, I'm also having trouble adjusting the placeholder text. You say there is an option, but when I try to I get the error CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:]. I am trying to make my sign in form compatible with dark mode. Thank You.

from textfieldeffects.

raulriera avatar raulriera commented on June 19, 2024

Hi, please provide more detailed description of what you are trying to do

from textfieldeffects.

rp9994 avatar rp9994 commented on June 19, 2024

i want to create like this

Screenshot 2019-11-27 at 3 13 54 PM

from textfieldeffects.

raulriera avatar raulriera commented on June 19, 2024

For that you will have to modify the code, there is option to supply an attributed text for the placeholder

from textfieldeffects.

raulriera avatar raulriera commented on June 19, 2024

The error message is properly telling you what is going on, have you tried fixing the font first?

from textfieldeffects.

julien-tamade avatar julien-tamade commented on June 19, 2024

Yeah I'm trying emailInput.attributedPlaceholder = NSAttributedString(string: "Test Email", attributes: [NSAttributedString.Key.foregroundColor: UIColor.red, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 40)]) where emailInput is a HoshiTextField, but neither the color nor size attributes are affecting the placeholder text

from textfieldeffects.

raulriera avatar raulriera commented on June 19, 2024

Ah I see, emailInput.attributedPlaceholder is a property of UITextField directly and bypassing the values in this library. You need to use

placeholderFontScale to change the size
placeholderColor to change the color

This library doesn't support changing the font via attributed text, is its a combination of those 2 properties mentioned and using the normal font property

from textfieldeffects.

julien-tamade avatar julien-tamade commented on June 19, 2024

ah thank you!

from textfieldeffects.

stale avatar stale commented on June 19, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 3 days if no further activity occurs.

from textfieldeffects.

Related Issues (20)

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.