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

  • Home
  • SEARCH
  • 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 8085701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:12:46+00:00 2026-06-05T18:12:46+00:00

I would like to store the points whenever touchesMoved is called. So far everything

  • 0

I would like to store the points whenever touchesMoved is called. So far everything is working fine. However what I want to do is to create a “new” array every time touchesMoved is called. For example, once the touch ended the array of points are then saved into database with an identifier of 1. The next time the touchesMoved is called, the array is emptied and replaced with another set of points with a different identifier. I tried incrementing an integer in touchesEnded every time it is called, but I figured out that the integer will remain the same every time the touch ended. So how will I do this? Any help will be very much appreciated.

UPDATE:
For example I have this recorded points in my array:

100.000, 200.000
100.000, 202.000
100.000, 204.000

This points will be saved in the database with a identifier, let’s say 1.

1 | 100.000 | 200.000
1 | 100.000 | 202.000
1 | 100.000 | 204.000

Now, when the touches moved and ended again, the new set of recorded points will be saved with a different identifier, let’s say 2.

2 | 200.000 | 300.000
2 | 200.000 | 302.000
2 | 200.000 | 304.000

So basically what I want to happen is that every time the touchesMoved is called, it will record points that will be saved in an array. When the touches ended, this recorded points will be saved with an identifier. AND, once the touchesMoved is called again and ended, the new set of recorded points will be saved with a different identifier. Any ideas how to do it?

  • 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-05T18:12:47+00:00Added an answer on June 5, 2026 at 6:12 pm

    To store CGPoint in NSMutableArray, do this

    NSMutableArray *yourCGPointsArray = [[NSMutableArray alloc] init];
    [yourCGPointsArray addObject:[NSValue valueWithCGPoint:CGPointMake(100, 100)]];
    
    //Now getting the cgpoint back
    CGPoint point = [[yourCGPointsArray objectAtIndex:0] CGPointValue];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Lua and I want to create a table [doh] which would
I have a certificate .p12 and .crt and I would like store the public
I would like to store some data about open MdiChildren to restore them when
I would like to store an NSIndexPath an Array of NSDictionaries for later to
I would like to store some basic data of my application in a .plist
I would like to store large dataset generated in Python in a Django model.
I would like to store the cookies from one open-uri call and pass them
I would like to store lengthy .sql scripts in my solution and execute them
I would like to store very large sets of serialized Ruby objects in db
I would like to store a list of entityIDs of outlook emails to a

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.