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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:24:48+00:00 2026-06-14T14:24:48+00:00

According Apple specifications IB objects are to be defined using Storyboard/Xib. For some projects

  • 0

According Apple specifications IB objects are to be defined using Storyboard/Xib.
For some projects this may result in defining long lists of UILabels, UIButtons etc.
Which have to be connected to the code using IBOutlet’s.

Example:

@property (nonatomic, retain) IBOutlet UILabel *label1;
@property (nonatomic, retain) IBOutlet UILabel *label2;
...
@property (nonatomic, retain) IBOutlet UILabel *label998;
@property (nonatomic, retain) IBOutlet UILabel *label999;

Is there a way to identify a UILabel (or UIBUtton or UIImage etc) in the source code, and use that to change the content/properties of the Object?

Example pseudo code:

for (i=0;i<100;i++) {
        <label i>.text = @"...";
}

In the above code, I want to assign a string value to all the labels. How can this be done, so instead of the a way to identify the label.

  • 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-14T14:24:49+00:00Added an answer on June 14, 2026 at 2:24 pm

    You can set tag for UILabels in Interface Builder and later on identify them using tags.
    For example you can set tag from 1001 to 2000 for your 1000 labels and later on you can use this code to get the labels at runtime :-

    for (NSInteger iTag= 1001; iTag<2001; iTag++) 
    {
        UILabel *lblTest = (UILabel *)[self.view viewWithTag:iTag];
        lblTest.text = @"....";
    }
    

    In this way your first label will have a tag 1001 and last label will have a tag 2000 and you can use these labels in functions or in a loop.

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

Sidebar

Related Questions

According to Apple's documentation here , this should work in my code: @interface Menu
According to this Apple page , I've read that when interacting with Cocoa on
According to Apple , I can combine UINavigationController and UITabBarController using the code, e.g.
I am using NSInvocationOperation with NSOperationQueue developing in iOS5. According to apple documentation on
I am using UITableViewCellAccessoryDisclosureIndicator as accessoryType of my UITableViewCell . According to Apple's documentation,
According to Apple if one doesn't create an object using alloc or new then
This my first time develop app's. According the Apple iOS Human interface guidelines, it
According to Apple's documentation, CGLFlushDrawable or it's Cocoa equivalent flushBuffer may behave in couple
According to Apple documentation and other documentation I have read about on disk encryption
According to Apple's description, the aurioTouch sample app is suppose to get the audio

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.