开发者

iPhone RPG scrolling text for dialogue

开发者 https://www.devze.com 2023-01-02 10:18 出处:网络
I have an RPG in development, but I\'m still confused about the best way to display dialogu开发者_JAVA技巧e.

I have an RPG in development, but I'm still confused about the best way to display dialogu开发者_JAVA技巧e.

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 the scrollRangeToVisible method. As you browse methods don't forget it inherits from UIScrollView (so you can use UIScrollViewDelegate 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 from UIScrollView but UIView - so your animation approach would be based more on familiar things you can do to a UIView 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消