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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:11:02+00:00 2026-05-21T22:11:02+00:00

I have a UIView that I am placing UIImageView’s into, with each UIImageView being

  • 0

I have a UIView that I am placing UIImageView’s into, with each UIImageView being 16 pixels wide.

The query is if I add say 5 of the UIImageViews using addSubView, and the UIView is spec’d at 16 tall by 300 wide, is there any way to have the images in the view ‘stack up’ so to speak, so that the images are not on top of each other? Like adding image tags to a web page.

  • 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-21T22:11:03+00:00Added an answer on May 21, 2026 at 10:11 pm

    The easiest way I see of doing this is to keep a running tally of where you last placed an image, then increment by width, something like this:

    -(void) addImage:(UIImage*)img toView:(UIView*)view
    {
        static CGRect curFrame = CGRectMake (0,0,16,16);
        UIImageView* imgView = [[UIImageView alloc] initWithFrame:curFrame];
        imgView.image = img;
        [view addSubview:imgView];
    
        curFrame.origin.x += 16;
    }
    

    This will have the images appear within your view from left to right

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

Sidebar

Related Questions

I have a UIView that has several UIImageViews as subviews. Each of these subviews
I have a UIView container that has two UIImageView s inside it, one partially
I have a UIView that gets loaded with several custom NSObjects (graphShape). Each graphShape
I have a UIView that I am trying to render into a UIImage using
II have a UIView into which I am placing 3 subviews, all instances of
I have this UIView that contains two identical UIImageViews juxtaposed. I am looking to
I have an UIView that is used for overlaying a cameraPicker. Into this View,
I'm trying to add a UIView, in particular a UIImageVIew, after (that is, below,
I have an UIView that contains two UIImageView (one is a cartoon, the other
I have an application that starts playing a sound when user touches the uiview

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.