Easiest way to recreate the iPhone SMS application's user interface?
Greetings!
as a beginner in iPhone application development usin开发者_开发知识库g Objective-C, I was wondering what was the easiest way to recreate the iPhone SMS app's UI (the one with message bubbles and such)
I've thought of using a UITableView with a custom UITableViewCell that uses images to recreate the message bubbles. this works fine when the message thread contains only a small number of messages, but once it exceeds a certain amount, there is significant amount of time from when the view is pushed to a UINavigationController until it actually displays on screen. I believe that this is caused by computing for the height of each table cell (as well as the message bubbles).
I know that a lot of other chat clients have implemented user interfaces like such, but I can't seem to find a proper tutorial on how to do so.
links to tutorials or frameworks will be greatly appreciated. thank you.
You are in the right track. I think the best option is a UITableView
with custom UITableViewCell
instances as cells.
Make sure you are using a cell caching technique to avoid creating one cell for each different message you are trying to show. That might be slowing you down.
Check out this (dead) tutorial. It's great for what you want, and it will explain you how to reuse your cell components.
A helpful framework for most iOS apps is Three20. The documentation is a little scarce, but there is a ton of stuff in there. I thought of this framework for your app specifically because of the TTSpeechBubbleShape class designed to imitate the SMS speech bubbles exactly.
This framework is being actively worked on and is the framework behind the Facebook app and literally hundreds more. It is designed to be powerful, perform well, and to make your life easier.
More information on the huge amount of classes that are available to you can be found here: http://api.three20.info/annotated.php
精彩评论