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

  • Home
  • SEARCH
  • 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 8127895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:41:42+00:00 2026-06-06T07:41:42+00:00

I have a list of names from Facebook in my uitableview , when user

  • 0

I have a list of names from Facebook in my uitableview , when user select a row user detail should be shown in another view.

in my friends.m

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    long long fbid = [[arrayOfIDs objectAtIndex:indexPath.row]longLongValue];

    NSString *user=[NSString stringWithFormat:@"%llu/picture",fbid];

    [facebook requestWithGraphPath:user andDelegate:self];

    FriendDetail *profileDetailPicture = [[FriendDetail alloc] initWithNibName: @"FriendDetail" bundle: nil];


    profileDetailPicture.profileImage.image= transferImage.image;

    profileDetailPicture.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

    [self presentModalViewController:profileDetailPicture animated:YES];

    [profileDetailPicture release];


}

-(void)request:(FBRequest *)request didLoad:(id)result{
    if ([result isKindOfClass:[NSData class]])
    {
       transferImage.image = [[UIImage alloc] initWithData: result];
      // UIImage * sendPicture=[[UIImage alloc] initWithData: result];

        NSLog(@"Profile Picture");
    }
}

This fine because if i put an uiiamgeview below table view to see if it works or not,it seems i get the correct image it works.
enter image description here

but when i select the row and try to send the image to other viewcontroller UIImageview in following lines

FriendDetail *profileDetailPicture = [[FriendDetail alloc] initWithNibName: @"FriendDetail" bundle: nil];


        profileDetailPicture.profileImage.image= transferImage.image;

        profileDetailPicture.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

        [self presentModalViewController:profileDetailPicture animated:YES];

it doesnt send the image to the detail view controller where friends’ image should appearenter image description here

I tried both UIImageView and UIImage methods but couldnt make it done.

Whats wrong with the code?

———EDIT———-

So thanks to answer i have changed the code, following code works fine

-(void)request:(FBRequest *)request didLoad:(id)result{

    if ([result isKindOfClass:[NSData class]])
    {

       transferImage.image = [[UIImage alloc] initWithData: result];

        FriendDetail *profileDetailPicture = [[FriendDetail alloc] initWithNibName: @"FriendDetail" bundle: nil];

        [profileDetailPicture view];
        profileDetailPicture.profileImage.image= transferImage.image;


        profileDetailPicture.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

        [self presentModalViewController:profileDetailPicture animated:YES];

        [profileDetailPicture release];
        NSLog(@"Profile Picture");
    }
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{


    long long fbid = [[arrayOfIDs objectAtIndex:indexPath.row]longLongValue];

    NSString *user=[NSString stringWithFormat:@"%llu/picture",fbid];

    [facebook requestWithGraphPath:user andDelegate:self];

}
  • 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-06T07:41:44+00:00Added an answer on June 6, 2026 at 7:41 am

    This line is the problem:

    profileDetailPicture.profileImage.image= transferImage.image
    

    I’m assuming profileImage is an IBOutlet? The issue is that this will be nil at this point, since your detail view controller’s view will not yet be loaded.

    The usual way to solve this is to store the image in a member variable of your detail controller and then populate it into the profileImage’s image member in viewDidLoad or somewhere else you’re sure the detail view is already loaded. (For example, if you were to call [profileDetailPicture view] to force the view to load before this line, it should work.)

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

Sidebar

Related Questions

I have a list of facebook user id numbers from an xml response and
Assume that I have a list of employee names from a database (thousands, potentially
So i have an activity that imports a list of names from a .txt
I have a program that takes a list of names from a file and
I have a question: I have a list (for example with Names from my
Hi I am using following FQL to fetch friends list from facebook and their
I have a list of individual redirects that move users (and google) from abc.site.com/page/name
I have list of screen names that can be filtered by letter. The Issue
I have a list of names: ['john smith', 'sally jones', 'bob jones'] I want
I have a list of names in a box that I want to filter

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.