Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 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 Reply

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 :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...