0
我有兩種意見之一是TextView的和它下面是一個滾動視圖,在我的應用程序TextView的應切換時,觸摸它。我將「頂層空間到:文本視圖」擴大IB.But了滾動當我展開textView時,它似乎不起作用。iOS的自動佈局並調整其大小
這裏是撥動擴大代碼。
- (void)onTextViewClicked:(id)sender
{
CGRect targetFrame = _descTextView.frame;
if (_isTextViewExpand) {
targetFrame.size.height = _descTextViewNormalHeight;
_descTextView.frame = targetFrame;
_isTextViewExpand = NO;
[_contentScrollView setContentSize:CGSizeMake(320.f, kContentScrollViewDefaultHeight)];
}
else {
targetFrame.size.height = _descTextViewExpandHeight;
_descTextView.frame = targetFrame;
_isTextViewExpand = YES;
[_contentScrollView setContentSize:CGSizeMake(320.f, kContentScrollViewDefaultHeight + (_descTextViewExpandHeight - _descTextViewNormalHeight))];
}
}
問題不明確 – 2013-03-20 07:11:10