2011-09-30 52 views

回答

0

您可以根据textview矩形滚动视图,以便在弹出的键盘上显示该视图。

试试这个当TextView的准备编辑

-(void) textViewDidBeginEditing:(UITextView *)textView { 
     CGPoint pt; 
     CGRect rc = [textView bounds]; 
     rc = [textView convertRect:rc toView:scrollView]; 
     pt = rc.origin; 
     pt.x = 0; 
     pt.y -= 60; 
     [scrollView setContentOffset:pt animated:YES]; 
} 
相关问题