I have a long string:

```
"A very long string"

```

that won't be displayed fully in a `UITableView`, i.e. it gets truncated to:

```
"A very long s..."

```

Is it possible to have this text in a `UITableViewCell` automatically scroll horizontally and indefinitely so that it loops around? Perhaps this can be achieved using an attributed string?

```
    let cell = tableView.dequeueReusableCell(withIdentifier: "TableViewCell", for: indexPath)
    cell.textLabel?.text = "A very long string"
    cell.textLabel?.textAlignment = .center

```

Thanks in advance for any help with this!

**EDIT (my attempt at a solution proposed)**

```
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

    let cell = tableView.dequeueReusableCell(withIdentifier: "TableViewCell", for: indexPath)

    let frame = CGRect(x: 0.0, y: 0.0, width: cell.bounds.width * 2.0, height: cell.bounds.height)

    let scrollView = UIScrollView(frame: frame)
    cell.addSubview(scrollView)

    let label = UILabel(frame: scrollView.bounds)
    scrollView.addSubview(label)
    label.text = "some very long text that doesn't quite fit"
    label.textAlignment = .center

    let newFrame = CGRect(x: label.frame.width, y: 0, width: label.frame.width, height: scrollView.frame.height)
    UIView.animate(withDuration: 1.0, delay: 0.0, options: [.repeat, .autoreverse], animations:( { void in
        scrollView.scrollRectToVisible(newFrame, animated: true)}),
        completion: ({ completed in }))
}

```