2011-02-28 27 views

回答

7

將這個分爲:viewDidLoad中{}

//create UITextView 

UITextView *myUITextView = [[UITextView alloc] initWithFrame:CGRectMake(20,188,280,260)]; 
myUITextView.text = infoText; 
myUITextView.textColor = [UIColor lightGrayColor]; 
myUITextView.font = [UIFont systemFontOfSize:14]; 
[myUITextView setBackgroundColor:[UIColor clearColor]]; 
myUITextView.editable = NO; 
myUITextView.scrollEnabled = YES; 
[Scrollerview addSubview:myUITextView]; 
[myUITextView release]; 

其中 '信息文本' 是你的文字, 'Scrollerview' 是你的UIScrollView

相關問題