0
두 가지보기가 있습니다. 하나는 textView이고 아래에는 scrollview가 있습니다. 응용 프로그램에서 textView가 touch 할 때 확장됩니다. IB.but의 scrollView에 대한 "Top Space to Text View"를 설정합니다. textView를 확장하면 작동하지 않는 것처럼 보입니다.크기가 조정 된 iOS autolayout
여기가 확장 코드입니다.
- (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))];
}
}
질문이 명확하지 않습니다. –