2010-05-05 53 views
0

我想在cocos2d中使用UITextView。我在init()方法中使用我写的代码,我们如何使用UITextView在cocos2d中添加滚动文本?

UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; 
textView.backgroundColor = [UIColor clearColor]; 
textView.text = @"I am First enemy"; 
[textView setEditable:NO]; 

[[[CCDirector sharedDirector]openGLView]addSubview:textView]; 

取向在这样

[[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; 

我需要出现在横向模式下的文本,但我正在逐渐在以下方式中的文本。

alt text http://www.freeimagehosting.net/uploads/b0de877fb2.png

我怎样才能让文字显示在横向模式。我在cocos2d工作。 CanOI滚动文字?我应该添加什么来使文本向上和向下滚动。

谢谢。

回答

相关问题