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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:01:01+00:00 2026-06-17T22:01:01+00:00

UIView *view = nil; NSArray *subviews = [scrollView subviews]; CGFloat curXLoc = 0; for

  • 0
UIView *view = nil;

NSArray *subviews = [scrollView subviews];

CGFloat curXLoc = 0;

for (view in subviews)
{
    if ([view isKindOfClass:[UIView class]] && view.tag > 0)
    {
        CGRect frame = view.frame;

        frame.origin = CGPointMake(curXLoc, 0);

        view.frame = frame;


        curXLoc += (kScrollObjWidth);
    }
}

I had placed one Scrollview, within this scroll view i place 5 UIImageview in XIB file

I have one image and one button, whenever I clicked the button the image should be loaded into all the UIImageviews within the UIScrollview programmatically.

and also I used the following coding

for(UIImageView *addview in Scroll)
{

    if([addview isKindOfClass:[UIImageView class]])
    {

        UIImageView *newImage = (UIImageView *)addview;

        newImage.image = [UIImage imageNamed:@"EarP010.jpg"];
    }
}
  • 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-17T22:01:02+00:00Added an answer on June 17, 2026 at 10:01 pm

    Use this

    NSArray* objects = [[NSBundle mainBundle] loadNibNamed:@"your xib name" owner:nil options:nil];
    
    UIView* mainView = [objects objectAtIndex:0];
    
    for (UIView* view in [mainView subviews]) {
        if([view isKindOfClass:[UIImageView class]])
        {
            UIImageView *iview = (UIImageView *)view;
    
    
            iview.image = [UIImage imageNamed:@"your imagename.png"];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My didSelectRowAtIndexPath: -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [UIView beginAnimations:@View Flip context:nil]; [UIView setAnimationDuration:1.25]; [UIView
I'm displaying a UIView with a UILabel on it and this view&label become blurry
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if(section != 0) { UIView *view = [[[UIView
Say, I've two overlapping UIView layers: ----view-top --view-below When I touch the screen, I
I have a little app up that has both CCLayer view and UIView. That
I have a custom view (inherited from UIView ) in my app. The custom
I have a UIView on top of another view that's using a UITouchGesture. The
I know UIView are not thread safe so i cant add a view on
I have a UIView that gets added to my UITableView .view as a subview.
in my application the first view is an UIView with a couple of uilabel

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.