1

使用故事板我想添加并UITextviewUIScrollview屏幕中滚动 TextView。请帮我...

scroller.contentSize=CGSizeMake(320,846); 
[scroller setScrollEnabled:YES]; 
int GetIndex = [GetSelectedIndex intValue]; 
label = [firstheading objectAtIndex:GetIndex]; 
labelheading.text=label; 
textviews = [firstdesc objectAtIndex:GetIndex];
textview.text=textviews; 
[scroller addSubview:textview]; 
NSLog(@"textview:%@",textview);
 NSLog(@"image:%@",getimage); 
4

1 回答 1

0

只是一个建议,您可以先尝试在 ViewController 上添加 UIView。然后将 UIScrollView 拖到您的 UIView 中。然后将 UITextView 拖入其中。

我在故事板中有这种安排 - 因为我在顶级 UIView 以及 UIScrollView 中有一个图像

于 2012-11-09T10:08:56.633 回答