I have an RPG in development, but I'm still confused about the best way to display dialogue.
I want there to be a text box with text that scrolls (like any RPG), but what is the best way to accomplish this using X-Code?
Thanks!
I have an RPG in development, but I'm still confused about the best way to display dialogue.
I want there to be a text box with text that scrolls (like any RPG), but what is the best way to accomplish this using X-Code?
Thanks!
You should use a
UITextView
and thescrollRangeToVisible
method. As you browse methods don't forget it inherits fromUIScrollView
(so you can useUIScrollViewDelegate
too) which has some really useful methods related to movement.You could probably use just one
UITextView
in your app and manipulate the text/scrolling position as necessary. Using conventional animation all kinds of fades and effects are possible.If you need colored text with various fonts you need to use
UIWebView
which does not inherit fromUIScrollView
butUIView
- so your animation approach would be based more on familiar things you can do to aUIView
but still not hard.Don't forget to use that classic piece of RPG dialog, "..." - but please don't make text appear slowly, character by character, or have long un-skippable animations - going through the introduction of Final Fantasy Tactics Advance for the second time nearly killed me.