title: iOS - swipe gesture animation with only one view
body: <p>I have a UITextView which displays some notes the user wrote down. There are multiple pages of notes. I added a swipe gesture recognizer to the text view so that it flips to the next page if the user swipes to the left, and previous page if the user swipes to the right. I want to add sliding animations when the user swipes. That is, when the user swipes to the left, the current page slides out to the left and the following page slides in from the right.</p>
  
  <p>I saw some other posts saying that <code>CATransition</code> can be used for this purpose but looks like there has to be at least two views, but I only have one here (the UITextView). So what's the best way to achieve the sliding effect in my case?</p>
  
  <p><strong>EDIT:</strong> Looks like <code>UIScrollView</code>, the super class of <code>UITextView</code> could be configured to enable the paging effect. Is there anyway to directly enable paging on the scroll view part of the text view?</p>