Search code examples
iphoneiosuinavigationbaruicontrol

iPhone - what controls needed for a chat style app? (easy question)


In a portion of my app I need to make a chat between two users... I know how to send the messages between both but I don't know what are the best controls I have to use in the UI... I want a UI similar to WhatsApp(simple and very good looking)

For example:

WhatsApp Chat Image
(source: mzstatic.com)

  • At the bottom... maybe a UIToolBar + UITextField + 2x UIBarButtonItem?

  • In the middle(the messages)... I really don't know, this is my biggest question, the bubbles.

  • In the Top... maybe a UINavigationBar + 2x UIBarButtonItem?

I'm new making UIs but I'm sure that this is a easy question for you and this is the final step that I have to learn to finish my app =)

I don't want code, only the UIcontrols/hierarchy and/or any ideas if it's possible =)

Thanks in advance ;)

P.S: Sorry for my english :S


Solution

  • you're right about the top UINavigationBar with 2x UIBarButtonItems

    The middle seems like a UIScrollView and each chat bubble is using a stretchable UIImage

    [UIImage stretchableImageWithLeftCapWidth:15 topCapHeight:13]

    If the above piece of code doesn't help out you can look at the link below. This is how tweetie, the Twitter client used chat bubbles in its client with UITableView.

    http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/

    The bottom is probably a UIToolBar with two UIButton not Barbuttons I think and of course a UITextField