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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:42:39+00:00 2026-05-30T16:42:39+00:00

I found examples on StackOverflow for how to do curved corners on a UIImageView,

  • 0

I found examples on StackOverflow for how to do curved corners on a UIImageView, and this worked fine when I was setting the image in my Xcode gui builder tool. When I then added some code to change the image at runtime, the curved corners were only partially working.

Here is the code I am using to try and achieve curved corners:

thumbnail.image = [UIImage imageNamed:self.video.thumbnailFileName];
thumbnail.contentMode = UIViewContentModeScaleAspectFill;
thumbnail.clipsToBounds = YES;

// round the corners:
thumbnail.layer.cornerRadius = 10.0;
thumbnail.layer.masksToBounds = YES;

// add a border:
thumbnail.layer.borderColor = [UIColor lightGrayColor].CGColor;
thumbnail.layer.borderWidth = 3.0;

BEFORE: When setting the image via the gui builder in Xcode:
BEFORE: When setting the image via the gui builder in Xcode.

AFTER: Setting the UIImage programmatically. Notice the curved corners look terrible:
AFTER: Setting the UIImage programmatically. Notice the curved corners look terrible.

The original PNG image being used in the app:
The original PNG image being used in the app.

  • 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-30T16:42:39+00:00Added an answer on May 30, 2026 at 4:42 pm

    The issue here was a series of strange coincidences…

    First issue was I had two versions of this image at one point, and somehow the first version I had was still being transferred over to my app bundle (or was in my app bundle from previous debug builds). That first one was a different since and wasn’t lining up correctly with the curved corners. So once I cleaned my build, that original file was gone.

    Second issue was the second file had a slightly different filename, which I didn’t notice, and so that was the second reason I couldn’t get this working properly.

    So … the code was right, just had issues with my image files! Sorry for the confusion.

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

Sidebar

Related Questions

I've searched for an answer and found some c#-examples, but could not get this
This error is done strictly by following examples found on the docs . And
I'm trying to merge a textstring with an image. I've found examples here on
I found an answer that almost solves my problem: https://stackoverflow.com/a/5717191/1065546 This answer demonstrates how
I've been googling and querying stackoverflow quite a bit but I haven't found this
I have found this example on StackOverflow: var people = new List<Person> { new
I haven't been able to adapt the examples I have found in stackoverflow that
Preface: I have looked all over stackoverflow.com and google for this. I have found
I found this bit of code on stackoverflow at Best practices on displaying search
I have found numerous examples on uploading a file to a web server via

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.