当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - How to add a textview in Uiscrollview?

问题描述:

Using storyboard i want to add UITextview in the UIScrollview and the scroll the TextView in the in the screen. please help me...

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);

网友答案:

Just a suggestion, you could try adding a UIView on your ViewController first. Then drag the UIScrollView into your UIView. Then drag a UITextView into that.

I have this arrangement in a Storyboard - because I have an image in the top level UIView as well as the UIScrollView

分享给朋友:
您可能感兴趣的文章:
随机阅读: