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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:48:12+00:00 2026-06-17T16:48:12+00:00

I have a strange problem with rounded corners on a UIView. As you can

  • 0

I have a strange problem with rounded corners on a UIView. As you can see in the screenshots, the black corner is not exactly precise, which means one can see some pixels of the underlying view (i.e. white pixels in the corner highlighted with the yellow arrow).

I have set the corner radius like this:

contentView.layer.cornerRadius = 5.0f;
contentView.layer.masksToBounds = YES;

contentView is an UIView object that contains an UIImageView as subview (displays currently the Google image). Moreover contentView is added as a subview to the main view that is displayed in the screenshots.

I have already tried out several things with no satisfiable result, including:

  • Added the corner radius directly to the main view, not the content
    view
  • Increased / decreased the value of the border size and corner radius
  • Changed the background color of all mentioned views to black, white and clear (currently it is clear)

I appreciate your help. Thanks!

Screenshots:

  • 1
  • 2
  • 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-17T16:48:12+00:00Added an answer on June 17, 2026 at 4:48 pm

    I’ve tried the following code which works fine for me

    UIView *vi = [[[UIView alloc] initWithFrame:frame] autorelease];
    vi.backgroundColor = [UIColor clearColor];
    [self addSubview:vi];
    
    UIImageView *imgv = [[[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, frame.size.width, frame.size.height)] autorelease];
    imgv.layer.cornerRadius = 4.0;
    imgv.layer.borderColor = [UIColor whiteColor].CGColor;
    imgv.clipsToBounds = YES;
    imgv.image = [UIImage imageNamed:@"xxxxxx.png"];
    [vi addSubview:imgv];
    

    Hope it may help you little.

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

Sidebar

Related Questions

I have strange problem for which I can't think of a solution. I have
I have a strange problem where a XAML control is not visible in the
I have strange problem. I have class which behaves similar dropdown list. package test.view;
I have strange problem with .htaccess I can't solve: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond
I have a strange problem that I can't get my head around: I have
I have some strange problem with PIL not resizing the image. from PIL import
i have strange problem doing reporting: i have numerous clients with different issued invoices.
I have strange problem with receiving data from socket. On client im using air
I have a strange problem on ipv6 connection. I write down a simple client
I have a strange problem with IE. I have a sequence of forms on

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.