O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a chat-style interface

The iPhone introduces a special interface for displaying SMS and chat messages. It displays bubbles similar to comic balloons with the text of each user who participates in the conversation. These bubbles appear on the right or on the left depending on the user who types the text.

This interface may not be very common, but it can be useful for some kinds of applications needing to display text belonging to different users at the same time.

Getting ready

Let's use the UiUIKIt framework because it allows you to build this interface in an easy way. The final result will be awesome and funny!

How to do it...

First of all, we'll create a regular body HTML tag with a specific value (chat) for its id attribute. Don't forget ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required