![](/img/trans.png)
[英]UITextField and UITextView disappears after scrolling in tableview?
[英]UITextView first line disappears when scrolling
我做了自己的實現,讓我的UITextView一直上下滾動(顯然,給選項UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse不適用於iOS 7中的setContentOffSet)。
因此,代碼使我的UITextView(不可編輯和選擇)上下滾動。 無論如何,當它開始向下滾動時,UITextView的第一行都會消失。 再次向上滾動時,將再次顯示該行(直到開始向下滾動動畫)。
我已經檢查了是否沒有其他視圖隱藏第一行。
我真的被困在這里,因為這似乎是框架中的一些錯誤,但是我找不到合適的解決方法。
[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];
}];
}
}
];
好的,這就是解決方案: https : //stackoverflow.com/a/19797795/3808713
不幸的是,我最初沒有找到這個。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.