How can we add scrolling text in cocos2d by using UITextView ?
Posted
by srikanth rongali
on Stack Overflow
See other posts from Stack Overflow
or by srikanth rongali
Published on 2010-05-05T07:44:14Z
Indexed on
2010/05/08
5:38 UTC
Read the original article
Hit count: 208
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
[[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
I need the text to appear in landscape mode, but I am getting the text in following way.
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.
© Stack Overflow or respective owner