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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:54:40+00:00 2026-06-12T23:54:40+00:00

I want to use iCarousel ( a library providing a coverflow scrolling style )

  • 0

I want to use iCarousel ( a library providing a coverflow scrolling style )
I have created a View with XIB. On that View I have UIImageView
And I have a Controller for that View with all the IB things set up ( ‘view’ of the FileOwner set to my view and there is an outlet of UIImageview )

Programmatically I create the Controller

SBTViewController* iv1 = [[SBTViewController alloc] initWithNibName:@"SBTViewController_iPhone" bundle:nil];
SBTViewController* iv2 = [[SBTViewController alloc] initWithNibName:@"SBTViewController_iPhone" bundle:nil];

and then

UIImage* im1 = [UIImage imageNamed:@"1.png"];
iv1.imView.image = im1;


UIImage* im2 = [UIImage imageNamed:@"2.png"];
iv2.imView.image = im2;

Please note that I am not adding the view of iv1 controller to be shown or be part of any hierarchy just now.
Instead, I am storing the pointer, and some time later ( when the carousel moves ) I simply give the iv1.view to the carousel to show it up.

I can see the view but not the image …

After searches I found a question on stackoverflow where it is explained that setting image to the imageview before it was added to the views hierarchy will not actually work, meaning that I can only set up images programatticaly after ViewDidLoad.
But in my case I want to init each instance with different values, so adding code in in ViewDidLoad is not robust enough …

Edit : I just found out that simply accessing the view paramater of the controller like this

iv1.view.tag

will cause the view to be loaded

So How should I do it ?
Hide it beneath others ? Ugly

thanks

  • 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-12T23:54:41+00:00Added an answer on June 12, 2026 at 11:54 pm

    Your problem is that when you create your UIImage, your UIImageView is not yet created. So two solutions: you create your UIImage after the viewDidLoad. But if you don”t want that, you may remove your UIImageViews from your XIB and create them yourself in the init method of your class, and then add them to your view hierarchy in the viewDidLoad.

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

Sidebar

Related Questions

i want use some data from a website with web service. i have a
We have a powerbuilder application and we want use a scanner through this application
I just want use jstl:core with SpringMVC. My controller contain something like : private
I want use a typedef struct that isn't already defined, but it is later.
I have an application created for 3D carousel view using open gl es. I
I want use page that has this form: <form method=post action=modules.php?name=search> <input onkeypress=FKeyPress(this); onkeydown=FKeyDown(this);
I have a winforms project that I want to develop a custom control for.
I want use of switch and case in php and codeigniter library, i try
I want to have view in which a 2 v-boxes are in two different
i want use single quotations inside a transact sql statement, then execute that statement.

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.