UIScrollView dynamically resize UILabel
问题 i have got a UILabel which is not static. I want to resize my scroll view so that it fits the label. Here is my idea now: self.scrollView.contentSize = CGSizeMake(320.0, 92+self.contentLabel.frame.size.height); 92 stands for pixels from where my label start. (there is a heading too) But it doesn't work, it seems to be connected with Interface Builder also. Thanks guys. 回答1: You need to set the frame as well. The contentSize of the scrollview is just what is within, not the frame of the view