# How to bottom of textview via animation

**URL:** <https://forums.kodeco.com/t/how-to-bottom-of-textview-via-animation/34500>\
**Category:** Swift\
**Created:** [September 18, 2017, 1:33am UTC](https://forums.kodeco.com/t/how-to-bottom-of-textview-via-animation/34500 "2017-09-18T01:33:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timswift](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/timswift/32/110937_2.png) [@timswift](https://forums.kodeco.com/u/timswift)\
**Post date:** [September 18, 2017, 1:33am UTC](https://forums.kodeco.com/t/how-to-bottom-of-textview-via-animation/34500/1 "2017-09-18T01:33:31Z")

</div>

My code below scrolls to the top of the textview. The command is .zero. What is the command using this same format to go to the end or bottom of the textview. What is the opposite of .zero?

```
         self.theTextView.contentOffset = .zero

```

---

<div class="post-metadata">

**Author:** ![nikita\_gaydukov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nikita_gaydukov/32/77683_2.png) [@nikita\_gaydukov](https://forums.kodeco.com/u/nikita_gaydukov)\
**Post date:** [September 18, 2017, 7:12am UTC](https://forums.kodeco.com/t/how-to-bottom-of-textview-via-animation/34500/2 "2017-09-18T07:12:09Z")

</div>

Hi @timswift

The contentOffset is type of CGPoint. So you need to create such CGPoint that will scroll to the bottom of the textView, probably something like this:

`yourTextView.contentOffset = CGPoint(x: 0, y: yourTextView.contentSize.hight)`

Nikita

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [March 3, 2018, 5:33pm UTC](https://forums.kodeco.com/t/how-to-bottom-of-textview-via-animation/34500/3 "2018-03-03T17:33:44Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
