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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:01:59+00:00 2026-06-07T22:01:59+00:00

I have a complex UIBezierCurve which I need to draw once with some particular

  • 0

I have a complex UIBezierCurve which I need to draw once with some particular line parameters, and then draw it again as overlay with other line parameters, but also I need the last part of the curve to be slightly shorter than in previous one.

To do this I want to create the curve by addLineToPoint:, moveToPoint: up to the last part, then make a copy of this curve and add the final segments of the line differently in original and copied curves. And then I stroke the original curve, and the copied one.

The problem is that it doesn’t work as I expected.
I create a copy of the curve by:

UIBezierPath* copyCurve = [originalCurve copy];

And the drawing which I do in the originalCurve after that, is applied also to the copyCurve, so I can’t do independent drawing for any of this curves.

What is the reason for this connection between original and copy and how can I get rid of it?

EDIT 1:
A solution which I’ve found is to create the copy in the following way:

UIBezierPath* copyCurve=[UIBezierPath bezierPathWithCGPath:CGPathCreateMutableCopy(originalCurve.CGPath)];

Since this works properly, maybe the problem is in the immutability of the copy I get with

[originalCurve copy]
  • 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-07T22:02:01+00:00Added an answer on June 7, 2026 at 10:02 pm

    Create a new, identical path by using the CGPath.

    path2 = [UIBezierPath bezierPathWithCGPath:path1.CGPath];
    

    The CGPath property docs state that:

    This property contains a snapshot of the path at any given point in time. Getting this property returns an immutable path object that you can pass to Core Graphics functions.

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

Sidebar

Related Questions

I have some complex regular expressions which I need to comment for readability and
I have a complex view, which is described here: View of multiple tables. Need
We have complex template classes that have some methods which will not work with
I am using WCF and REST, and I have complex types, which are working
I have some complex message to show inside of a flash message so instead
I have a complex type defined which doesn't currently contain any minOccurs restrictions. When
i have complex xslt that formats xml to html now i need to be
I have complex logic which is not possible (too slow) to run through PHP
I have complex polygons which I know the minimum x, minimum y, maximum x
I have a complex action which can take a long time to run. If

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.