0

I made my own implementation to let my UITextView scroll up and down all the time (as apparently giving the options UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse doesn't work for setContentOffSet in iOS 7).

So the code lets my UITextView (which is not editable and selectable) scroll up and down. Anyway when it starts scrolling down, the first line of the UITextView disappears. When it's scrolling up again, the line is shown again (until the scrolling down animation is started).

I already checked that there is no other view hiding the first line.

I'm really stuck here, as this seems to be some bug by the framework, but I can't find a decent workaround.

[UIView animateWithDuration:1.5f
                      delay:0.3f
                    options:UIViewAnimationOptionCurveLinear
                 animations:^{
                     [self.detailTextTop setContentOffset:CGPointMake(0, maxScrollPoint) animated:NO];

                 }
                 completion:^(BOOL finished) {
                     if (shouldScroll) {
                         __weak id weakSelf = self;
                         [[NSOperationQueue mainQueue] addOperationWithBlock:^{
                             [weakSelf performSelector:@selector(scrollNote) withObject:self afterDelay:1.5];
                         }];
                     }
                }
 ];
suntoch
  • 1,834
  • 2
  • 13
  • 13

1 Answers1

0

Okay, this was the solution: https://stackoverflow.com/a/19797795/3808713

Unfortunately I didn't find this in the first place.

Community
  • 1
  • 1
suntoch
  • 1,834
  • 2
  • 13
  • 13