ScrollView中的UIScrollView – ScrollBars不显示

背景故事

我正在写一个ipad应用程序,它具有使用UIScrollView水平滚动的图像。 这工作正常。 现在为每个图像我需要有一个UIScrollView有一些文本解释图像。 这将是一个垂直的scrollView。 出现垂直的ScrollView,但不出现滚动条。 任何想法为什么? 代码如下:

CGRect scrollViewFrame = CGRectMake(760, 70, 205, 320); UIScrollView * contentScrollView = [[UIScrollView alloc]initWithFrame:scrollViewFrame]; [contentView addSubview:contentScrollView]; CGSize scrollViewContentSize = CGSizeMake(205, 100); [contentScrollView setContentSize:scrollViewContentSize]; [contentScrollView setPagingEnabled:YES]; contentScrollView.delegate = self; UILabel *titleLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 205, 40)]; UILabel *subtitleLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 60, 205, 50)]; UITextView * mainContent = [[UITextView alloc]initWithFrame:CGRectMake(10, 110, 205, 230)]; [titleLable setText:storyTitle]; [subtitleLable setText:storySubTitle]; [contentView setUserInteractionEnabled:YES]; [mainContent setText:storyDescription]; 

此外,主要的滚动视图已经添加使用Interface Builder,并正常工作。 Wnyone知道为什么会这样吗?

滚动视图只显示滚动条,并允许用户在内容大小大于滚动视图大小的情况下进行滚动,正如我在代码中看到的,滚动视图大小为(205,320),而内容大小仅为(205,100)。