Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
391 views
in Technique[技术] by (71.8m points)

cocoa touch - Creating a "chat bubble" on the iPhone, like Tweetie

Just curious, did I overlook somewhere in the API to display a chat bubble type image as found in the iPhone's SMS application? There's a few applications out there that use bubbles that look verbatim to the iPhone's and I'm wondering if they're using a native widget or their own image.

This is also seen in the Tweetie application where the content of the tweets are.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I suggest using the stretch method they recommend for button images.

[UIImage stretchableImageWithLeftCapWidth:15 topCapHeight:13]

You can see a working example by downloading Twitterfon's source(it's on the FAQ page). You can see how they code a reusable control for it as well as example images for creating your own bubble.

Edit - Source is no longer available(NDA, possibly)

I put the image up here. You should be able to figure out the rest :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...