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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:19:06+00:00 2026-05-26T21:19:06+00:00

I am working on something similar to a canvas, users can add drag labels

  • 0

I am working on something similar to a canvas, users can add drag labels onto a view, resize them and whatnot.

My Question for you is: What do you think is the best way to load these labels programatically?

This may sound foolish at first but I do not know how many labels there will be, so I do not want to hardcode n Labels and find the user uses n-200, if you see what I mean? I am aware that it is simplistic to do:

UILabel *myLabel = [[UILabel alloc] init];

but then I have one label called myLabel, is there any way to programatically name these variables? As we all know we cannot have more than variable with the same name.

An example may help:
User drags on 2 labels, saves this view. I come to load it later, programatically. What is the best way to create and name these 2 labels, having no prior knowledge of how many labels there were (i.e. cannot be hardcoded).

I am aware this is a shoddy explanation but, if someone can wade through my crap and see the question, please add your 2 cents!

  • 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-26T21:19:07+00:00Added an answer on May 26, 2026 at 9:19 pm

    You could assign a numeric value to the “tag” property of the UILabel if you’re trying to somehow have an identifier associated with them. (If I’m understanding your question correctly)

    Or if the question is how to load them, you could use NSMutableArray and then just keep looping through your saved labels, create them, assign the new UILabel reference to a new entry in the array.

    Again, not 100% sure of what the issue is that you’re facing though maybe this can help.

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

Sidebar

Related Questions

I want to know i can do something similar to this (not working) code
I am working on something similar to this question asked in 2010 How to
I'm working on something of a wizard-type application to allow users to build simple
Working jQuery, what I'd like to perform is something similar to the following: $('sometag').children().wrap('<div></div>');
I'm working on a project where users can define functions (to do things to
I'm working on a test project which is something similar to FingerPaint example in
I'm working on application which is drawing on Canvas similar to Finger Paint demo
I'm trying to do something similar to this question , but it's a bit
Is there something similar to PHP's SoapClient class for c++? I am working on
I am working on a website and the client wants to have something similar

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.