Vladimir Vladimir - 1 year ago 98
Objective-C Question

iOS8 SpriteKit — how to show a lot of text?

I have a completed gameplay based on SpriteKit for iOS8

And now I need to make a text message to show «game rules» to player.

But it is difficult use only SKLabelNode to show a lot of text with Bold & Underline in particular for different languages.

Is there way to show text messages by using HTML or «WebView» or any other acceptable technology in SpriteKit?

If NOT, maybe somebody has another solution?

Answer Source

you can define a web view inside SKScene and add that that view as Subview

    CGRect frame = CGRectMake(0,0,200,200);
//where first 2 var are x and y and rest of the two is width and height
       UIWebView *webView =[[UIWebView alloc] initWithFrame:frame ];
        webView.delegate = self;
        [webView loadHTMLString:@"<p>I stand here today humbled by the task before us, grateful for the trust you have bestowed, mindful of the sacrifices borne by our ancestors. I thank President Bush for his service to our nation, as well as the generosity and cooperation he has shown throughout this transition</p>" baseURL:Nil];
        [self.view addSubview:webView];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download