Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa touch 如何使用UITextView在cocos2d中添加滚动文本?_Cocoa Touch_Iphone Sdk 3.0_Uitextview_Cocos2d Iphone - Fatal编程技术网

Cocoa touch 如何使用UITextView在cocos2d中添加滚动文本?

Cocoa touch 如何使用UITextView在cocos2d中添加滚动文本?,cocoa-touch,iphone-sdk-3.0,uitextview,cocos2d-iphone,Cocoa Touch,Iphone Sdk 3.0,Uitextview,Cocos2d Iphone,我想要cocos2d中的UITextView。我用init方法写代码 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

我想要cocos2d中的UITextView。我用init方法写代码

 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];   
我需要在横向模式下显示文本,但我得到以下方式的文本

如何使文本以横向模式显示。我在cocos2d工作。我可以滚动文本吗?我应该添加什么使文本上下滚动


多谢各位

从下面的url中,我找到了我的答案

我曾经

textView.transform = CGAffineTransformMakeRotation(CC_DEGREES_TO_RADIANS( 90.0f ));