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 6607583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:31:08+00:00 2026-05-25T19:31:08+00:00

The technique shown in a similar question is a rectangular bubble. How to draw

  • 0

The technique shown in a similar question is a rectangular bubble. How to draw one in an oval shape? i.e.:

   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-05-25T19:31:08+00:00Added an answer on May 25, 2026 at 7:31 pm

    I would do it in two iterations.
    First get the context and begin a path. Fill an ellipse and then a custom path that encloses a triangle with three lines. I assumed the following dimensions: 70 width, 62 height. Override draw rect in a subclass of UIView and instantiate in a subclassed UIViewController:

    -(void)drawRect:(CGRect)rect {
        CGContextRef ctx = UIGraphicsGetCurrentContext();
        CGContextSetRGBFillColor(ctx, 0.0, 0.0, 1.0, 1.0);
        CGContextFillEllipseInRect(ctx, CGRectMake(0.0, 0.0, 70.0, 50.0)); //oval shape
        CGContextBeginPath(ctx);
        CGContextMoveToPoint(ctx, 8.0, 40.0);
        CGContextAddLineToPoint(ctx, 6.0, 50.0);
        CGContextAddLineToPoint(ctx, 18.0, 45.0);
        CGContextClosePath(ctx);
        CGContextFillPath(ctx);
    }
    

    Produces this in the iPhone simulator when added against a gray backdrop:

    enter image description here

    This second code example will almost duplicate what you produced above. I implemented this using flexible sizes that could be supplied to the UIView frame when you instantiate it. Essentially, the white portion of the speech bubble is drawn with a black stroke over lay to follow.

    -(void)drawRect:(CGRect)rect {
        CGContextRef ctx = UIGraphicsGetCurrentContext();
        CGRect aRect = CGRectMake(2.0, 2.0, (self.bounds.size.width * 0.95f), (self.bounds.size.width * 0.60f)); // set the rect with inset.
        CGContextSetRGBFillColor(ctx, 1.0, 1.0, 1.0, 1.0); //white fill
        CGContextSetRGBStrokeColor(ctx, 0.0, 0.0, 0.0, 1.0); //black stroke
        CGContextSetLineWidth(ctx, 2.0); 
    
    
        CGContextFillEllipseInRect(ctx, aRect); 
        CGContextStrokeEllipseInRect(ctx, aRect);    
    
        CGContextBeginPath(ctx);
        CGContextMoveToPoint(ctx, (self.bounds.size.width * 0.10), (self.bounds.size.width * 0.48f));
        CGContextAddLineToPoint(ctx, 3.0, (self.bounds.size.height *0.80f));
        CGContextAddLineToPoint(ctx, 20.0, (self.bounds.size.height *0.70f));
        CGContextClosePath(ctx);
        CGContextFillPath(ctx);
    
        CGContextBeginPath(ctx);
        CGContextMoveToPoint(ctx, (self.bounds.size.width * 0.10), (self.bounds.size.width * 0.48f));
        CGContextAddLineToPoint(ctx, 3.0, (self.bounds.size.height *0.80f));
        CGContextStrokePath(ctx);
    
        CGContextBeginPath(ctx);
        CGContextMoveToPoint(ctx, 3.0, (self.bounds.size.height *0.80f));
        CGContextAddLineToPoint(ctx, 20.0, (self.bounds.size.height *0.70f));
        CGContextStrokePath(ctx);
     }
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a technique I found in one of the recent ASP.NET MVC books, I
Ten years ago, I was shown a technique for traversing a linked list: instead
I would like to create a temporary dialog similar to the one Visual Studio
What is the cleverest CSS technique that lets you use less HTML? One of
Is there any in-built technique for moving straight to the last UIViewController shown before
I am using the negative-text-indent technique I learned to show a text-image to the
The technique for adding a reference to the COM interop of Office in Visual
What technique should we use to make the httpsession object not loaded heavily with
Does anyone have a technique for generating SQL table create (and data insert) commands
Does anybody know a technique to discover memory leaks caused by smart pointers? I

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.