lexrus / lexrus/LTMorphingLabel

How can I change the text of the label without the animation?

Open
#60 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.1k
Forks
776
PR merge metrics
No merged PRs in 30d

Description

Sometimes, I don't want to the animation to occur when I set the text. I thought this would work:

// label's initial text is 00:04
label.morphingEnabled = false
label.text = "hello"
label.morphingEnabled = true

And this is what happened:

simulator screen shot jul 24 2016 5 57 53 pm

The app basically froze in that frame of the animation. Why?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sequence with a UILabel: disable morphing, set the text, then re-enable morphing. Trace how morphingEnabled and text updates interact; done means the label changes to "hello" immediately without freezing in an animation frame.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.