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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:05:02+00:00 2026-05-20T10:05:02+00:00

i create a view based project named myclass. and i add another UIviewcontroller subclass

  • 0

i create a view based project named myclass.

and i add another UIviewcontroller subclass to it, named as webdata.

In the webdataviewcontroller.m i get image from the webserver.

I need to display this image on imageview in myclassViewController.m from webdataViewController.m

for this my code in webdataViewController.m is

docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
    imagepath = [NSString stringWithFormat:@"%@/image.png",docDir];
    logopath = [NSString stringWithFormat:@"%@/logo.png",docDir];

myclassViewController *obj = [[myclassViewController alloc]init];
obj.homeimage.image = [UIImage imageWithContentsOfFile:imagepath];

but image is not displayed,i try to print image in console

NSLog(@"image to display %@",obj.homeimage.image);
NSLog(@"image to display %@",[UIImage imageWithContentsOfFile:imagepath]);    

but i get like this

image to display (null)
 image to display <UIImage: 0x6f614b0>

why i get null for obj.homeimage.image,i did n’t get can any one please help me.

Thank u in adavance.

(Let me add comment if question is not understandable)

  • 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-20T10:05:03+00:00Added an answer on May 20, 2026 at 10:05 am

    Are you sure that obj.homeimage is not nil? If it is nil then obj.homeimage.image = … will result to setting image property to nil object, that is “nothing”.

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

Sidebar

Related Questions

I'm attempting to create a strongly-typed view based on a class from another assembly.
I create new Window-Based project in xCode and a subclass of UIViewController name Main
The normal process to load project from ccrc sever is create a Base view
I create an application base on view based Application project . so i have
I create a new View-based Application project and modify the didFinishLaunchingWithOptions: method as follow.
I'm trying to create a drop down list in an ASP.NET MVC3 view based
I have a Create View page in my MVC3 project to create instances of
I am attempting to create a Backbone.js view based on a Twitter bootstrap-modal, which
In XCode 4, when you create a new View-base-application project, here is the .h
I have started a project in Xcode 3.x using the Create a Window-Based Application

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.