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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:43:24+00:00 2026-05-25T13:43:24+00:00

the problem is this… I created a class that extends UIBezierClass called PathExtended, in

  • 0

the problem is this…

I created a class that extends UIBezierClass called PathExtended, in which i added NSString ID;

I have, then, an array of PathExtended.
In the drawrect method i wrote:

p = [[PathExtended alloc] init];

for (int i=0; i<[arrayOfPaths count]; i++) {

    [p appendPath:[arrayOfPaths objectAtIndex:i]];
    [p closePath];
}

[p applyTransform:CGAffineTransformMake(a, b, c, d, e, f)];
[p fill];

Now, if i test in the touchend method:

if ([p containsPoint:pointTouched]) {
            NSLog(@"There is!");
        }

It’s ok!!! Instead, if i test:

if ([p containsPoint:pointTouched]) {
            NSLog(@"ID= %@", p.ID);
        }

Log is blank!!

I can understand why it happens, but, i can’t understand how solving problem.
I thought that appendPath creates a unique path, so, each single path information, like ID, is lost.
I thought also that, if i draw each path without using appendPath method i can solve the problem, but… i don’t know… it seems as if i’m following the wrong way.

Any idea???
Sorry for my english (i’m italian :P)

EDIT:

PathExtended .h

@interface PathExtended : UIBezierPath {

NSString* ID;
}

@property (nonatomic, readwrite) NSString* ID;

-(id) initwithID:(NSString*) _ID;
  • 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-25T13:43:24+00:00Added an answer on May 25, 2026 at 1:43 pm

    Imagine what would happen if you created a subclass of NSDecimalNumber, call it MyImaginaryNumber, such that your subclass stored an imaginary component. What would happen if you tried to call a method like -decimalNumberByAdding:? You wouldn’t really expect NSDecimalNumber’s implementation of that method to include your imaginary part in the resulting number, would you? NSDecimalNumber obviously doesn’t know anything about the imaginary part, so it can’t be expected to do the right thing.

    If you want -appendPath: to work with your PathExtended objects, you’ll need to override -appendPath: with an implementation that preserves the extra information in PathExtended. You can still call UIBezierPath’s implementation from inside your own if that’s useful, of course. For example, if your ID’s are composable, you might do something like:

    -(PathExtended*)appendPath:(PathExtended*)path
    {
        PathID newID = [self composeID:path.ID];
        PathExtended *newPath = [PathExtended pathWithBezierPath:[super appendPath:path] ID:newID];
        return newPath;
    }
    

    I’m not sure why your log message didn’t print at all, if that’s what happened, but it’s likely due to UIBezierPath not having an ID property.

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

Sidebar

Related Questions

Consider this problem: I have a program which should fetch (let's say) 100 records
Hello, I have the following problem: public class TestCombo extends JFrame{ public TestCombo() {
I have been puzzling over a problem this morning with LinqToSQL. I'll try and
i am a beginner and i have a problem : this code doesnt compile
This problem crops up every now and then at work. Our build machine can
This problem has been kicking my butt for a few days now. I have
Before describing the problem, let me first point out that this is a distinct
The N-Queens Problem: This problem states that given a chess board of size N
I had a problem this week (which thankfully I've solved in a much better
I have problem with this code, it's working on debug environment. On the instruments

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.