Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8125799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:56:04+00:00 2026-06-06T06:56:04+00:00

I am working on a children’s book app and would like to dynamically populate

  • 0

I am working on a children’s book app and would like to dynamically populate speech bubble(s) for character dialogues as shown in attached screenshots. Screenshots are from Cinderella app which was developed using Cocos2D (or 3D) I guess. However, I would like to achieve this functionality using objective-c and iOS sdk.

One approach would be:

Calculate the size of the text given a font and size (using the NSString method sizeWithFont:constrainedToSize:), then draw a rounded rectangle (using CALayer) to enclose that size.

For drawing rounded rectangle, set up a CALayer with a background color, border width and border color and color radius, and add that to a UIView object. That would give a speech bubble effect very easily.

Now, how would I get a corner that pointed to the character’s mouth? How do I pop-out and pop-in the CALayer from character’s mouth, how would I implement this animation? My main scene (illustration) would be an UIImageview and this dialogue pop-op should appear from character’s mouth in a animated way and after few seconds it should disappear as if its going back in character’s mouth. You suggestions would be greatly appreciated.

If you are aware of some sample code/article some place, please route me accordingly.

Here is a video link of the app which shows how character dialogues pop-in and out as speech bubble: http://www.youtube.com/watch?v=umfNJLyrrNg

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:56:06+00:00Added an answer on June 6, 2026 at 6:56 am

    Another way of doing this is through the use of images with cap insets. Take a look at the UIImage method:

    resizableImageWithCapInsets:

    Basically you can create an image of a minimum sized bubble, and have it stretch indefinitely while maintaining the look of the ‘bubble’ borders.

    The code below specifies an image where 12 pixels on the top, left, bottom and right be preserved when stretching/resizing the image:

    UIImage *bubble = [[UIImage imageNamed:@"bubble.png"] 
                                resizableImageWithCapInsets:UIEdgeInsetsMake(12, 12, 12, 12)];
    UIImageView *imgView = [[[UIImageView alloc] initWithImage:bubble] autorelease];
    imgView.frame = CGRectZero;
    

    Animating the size change of a UIImageView comes for free:

    [UIView animateWithDuration:0.3
                     animations:^(void) {
                         imgView.frame = CGRectMake(50, 50, 200, 100);
                     } completion:^(BOOL finished) {
    
                     }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a children's book app and would like to dynamically populate
I am working on a Children's book app for iPad and my app opens
I am working on an interactive children's book for the iPad that has a
Working jQuery, what I'd like to perform is something similar to the following: $('sometag').children().wrap('<div></div>');
Working on a movie website and would love to find an API that I
Working on a new app and using restful-authentication. I was trying to make it
I am working with a List<T> which contains both parent and children objects. In
I working my way through a C++ and Operating Systems book and I've come
I am working on a project that has a div with 32 children. I
I am working on a fairly simple demo app. Three input dropdown boxes are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.