【发布时间】:2013-06-11 09:12:11
【问题描述】:
我有一个包含一些组件的UIScrollView,其中一个组件是UITextView,我想要的是让UITextView 与UIScrollView 一起动态扩展,实际上我使用autoLayout ,所以这段代码不起作用:
CGRect frame = self.detailTextView.frame;
frame.size.height = self.detailTextView.contentSize.height;
self.detailTextView.frame = frame;
scroll.contentSize = CGSizeMake(scroll.contentSize.width,
300 + self.detailTextView.frame.size.height);
[self.detailTextView setFrame:frame];
我想要的是用故事板元素帮助我做到这一点。
【问题讨论】:
标签: ios uiscrollview uitextview autolayout