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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:33:03+00:00 2026-06-03T13:33:03+00:00

I started working on an iphone app and since I am not as experienced

  • 0

I started working on an iphone app and since I am not as experienced as most I can not figure out how to recreate dynamically imageviews, labels and buttons. Basically there will be an array in which some data is stored. However the size of the array will vary and such I can not make a static VC on the storyboard. I would like to use the following template and then the array should use this template to recreate it as many times as it needs :

http://www.dropinsight.eu/screenshot1.png

Thank you in advance for any help you can give me.

Cheers

Max

  • 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-03T13:33:06+00:00Added an answer on June 3, 2026 at 1:33 pm

    The previous answers about using a UITableView to display each entry in the array as a cell is the way you want to go. To answer your question about “dynamically creating” each item, you would want to create each UI element in your cellForRowAtIndexPath like this:

    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(x,y,w,h)];
    [imageView setTag:1];
    [cell addSubview:imageView];
    [imageView release];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x,y,w,h)];
    [label setFont:[UIFont systemFontOfSize:X]];
    [label setTag:2];
    [cell addSubview:label];
    [label release];
    
    UIButton *button1 = [[UIButton alloc] initWithFrame:CGRectMake(x,y,w,h)];
    [button1 setImage:[UIImage imageNamed:@"ABC"] forState:UIControlStateNormal];
    [button1 addTarget:self action:@selector(someMethod:) forControlEvents:UIControlEventTouchUpInside];
    [button1 setTag:3];
    [cell addSubview:button1];
    [button1 release];
    
    etc
    

    Then in your willDisplayCell method you will set the contents of any UI item that change for each row like this:

    UIImageView *imageView = (UIIamgeView *)[cell viewWithTag:1;
    UILabel *label = (UILabel *)[cell viewWithTag:2];
    
    [imageView setImage:[UIImage imageNamed:@"XYZ"]];
    [label setText:@"XYZ"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since I started working with JS, I've thought the only way to invoke a
I'm currently working on an iPhone app and I have a library from a
In the iPhone app I'm currently working on, I'd like two view controllers (I'll
I have started a new app a few days ago and began working with
My iPad app was working fine until I opened up IB and started editing
To cut a long story short, my project (an iPhone app) was all working
I'm currently working on an iphone application. I started working on this from a
I started iPhone development two months ago, so I can't call myself expert ;-)
I'm working on a Core Data app (for iPhone 3.0, though I don't think
I'm working on an iPhone app using objective C. I've got class A, which

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.