views:

353

answers:

1

I want a UITextView in cocos2d. I used in init method I wrote the code ,

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

the orientation is in this way

 [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];   

I need the text to appear in landscape mode, but I am getting the text in following way.

alt text

How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down.

Thank you.

A: 

from the below url I found my answer

http://www.cocos2d-iphone.org/forum/topic/3210

I used

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