Code Monkey home page Code Monkey logo

Comments (10)

lexrus avatar lexrus commented on May 16, 2024

It requires tons of tweaks. I hope I have enough time to do it.

from ltmorphinglabel.

lexrus avatar lexrus commented on May 16, 2024

Here is the concept.

┌─────────────────────────────────────────────────────────────┐
│        self.attributedString = ...SOME_NEW_STRING...        │
└─────────────────────────────────────────────────────────────┘
                               │                               
               ┌───────────────┘                               
               ▼                   ┌──────────────────────────┐
┌─────────────────────────────┐ ┌─▶│ enumerate each character │
│ draw the string off screen  │─┘  └──────────────────────────┘
└─────────────────────────────┘                  │             
                               ┌─────────────────┘             
                               ▼                               
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃     return ([rectOfChar], [colorOfChar], [fontOfChar])      ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
                               │                               
                               ▼                               
┌─────────────────────────────────────────────────────────────┐
│     calculate the new tuple by current morphingProgress     │
└─────────────────────────────────────────────────────────────┘
                               │                               
                               ▼                               
┌─────────────────────────────────────────────────────────────┐
│    draw each character on screen between display blinks     │
└─────────────────────────────────────────────────────────────┘

from ltmorphinglabel.

jkritikos avatar jkritikos commented on May 16, 2024

+100 for the effort! I tried approaching this but could not get it to work…

On Jul 23, 2015, at 4:27 PM, Lex Tang [email protected] wrote:

It requires tons of tweaks. I hope I have enough time to do it.


Reply to this email directly or view it on GitHub.

from ltmorphinglabel.

LivioGama avatar LivioGama commented on May 16, 2024

Oh :( I needed this feature too because I use attributed string :(

from ltmorphinglabel.

sentiasa avatar sentiasa commented on May 16, 2024

Brilliant library!! That would be amazing if it supported Attributed String. @lexrus you wrote your last comment a year ago; is there any news for attributed string enhancement? In my case, the only reason I wanted to use attributed string is to be able to give 'character spacing'

from ltmorphinglabel.

36bydesign avatar 36bydesign commented on May 16, 2024

+1

from ltmorphinglabel.

rakeshtookan avatar rakeshtookan commented on May 16, 2024

Any update on NSAttributedString or character spacing support?

from ltmorphinglabel.

elfanek avatar elfanek commented on May 16, 2024

This is definitely more of a work around than a solution, but if you're trying to set character spacing you can play around with these whitespace characters and insert one between every character in your label when setting the text. I've found that thin space and punctuation space look nice, but you'll have to play around with a few to find one that fits your style guide best.

Not ideal, but it works ¯_(ツ)_/¯

from ltmorphinglabel.

tkirby avatar tkirby commented on May 16, 2024

+1

from ltmorphinglabel.

holla-lishuangcheng avatar holla-lishuangcheng commented on May 16, 2024

i want to

from ltmorphinglabel.

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.