23 EYLÜL 2013, PAZARTESİ
UİTextView iOS7 klipler metin dizesi son satırı
İOS7 içinde UİTextView çok garip olmuştur. Senin gibi altına kaydırın yok senin UİTextView, son satırı giriyoruz yazın metni neden olur "dedi. kırpılmış HİÇBİR şey clipsToBound özellik ayarı denedim ama yine de metin klipleri.
Ben aramak istemiyorum, "setContentOffset:animasyonlu" çünkü bir: bu çok hacky çözüm.. ikincisi: eğer sürgü orta (dikey) bizim textview, olur neden istenmeyen kaydırma.
İşte ekran görüntüsü.

Herhangi bir yardım büyük mutluluk duyacağız!
Teşekkürler!
CEVAP
9 EKİM 2013, ÇARŞAMBA
Sorun iOS 7 kaynaklanmaktadır. Metin görünümünde temsilci, bu kodu ekleyin:
- (void)textViewDidChange:(UITextView *)textView {
CGRect line = [textView caretRectForPosition:
textView.selectedTextRange.start];
CGFloat overflow = line.origin.y line.size.height
- ( textView.contentOffset.y textView.bounds.size.height
- textView.contentInset.bottom - textView.contentInset.top );
if ( overflow > 0 ) {
// We are at the bottom of the visible text and introduced a line feed, scroll down (iOS 7 does not do it)
// Scroll caret to visible area
CGPoint offset = textView.contentOffset;
offset.y = overflow 7; // leave 7 pixels margin
// Cannot animate with setContentOffset:animated: or caret will not appear
[UIView animateWithDuration:.2 animations:^{
[textView setContentOffset:offset];
}];
}
}
Bunu PaylaÅŸ:

UİTextView bu metin otomatik düzen kul...
Metin dizesi kullanarak bir WordPress ...
Tespit iOS bir UİTextView atfedilen me...
Beraberlik satırı çok Tuval metin...
Nasıl hizalama ınline blok bir dikey b...