1

Sometimes my texts are not fitting into their space on UITableViewCell. They are shrunk with three dots .... Is it possible to animate them like Phone App on Android? Like sliding automatically.

Screenshot

do it better
  • 4,627
  • 6
  • 25
  • 41

1 Answers1

0

Use this class, it's fair easy and you can use just as a drop-in replacement for UILabel:

https://github.com/cbpowell/MarqueeLabel-Swift

To convert UILabel to MarqueeLabel, if you using Storyboard, simply set the class of UILabel object to MarqueeLabel

storyboard

then setup parameters in viewDidLoad function

override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view.
    titleLabel.type = .Continuous
    titleLabel.scrollDuration = 15.0
    titleLabel.animationCurve = .EaseInOut
    titleLabel.fadeLength = 20.0
    titleLabel.leadingBuffer = 30.0
    titleLabel.trailingBuffer = 20.0
}
Mousavian
  • 1,435
  • 1
  • 15
  • 23