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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:57:29+00:00 2026-05-31T15:57:29+00:00

i have just install the xcode 4.2.1 with ios5 and i try to use

  • 0

i have just install the xcode 4.2.1 with ios5 and i try to use json.

this my code

    -(void)start

{
    responseData = [[NSMutableData data]retain];
    membreArray = [NSMutableArray array];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http:******.php"]];
    [[NSURLConnection alloc] initWithRequest:request delegate:self];

}
-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
    [responseData setLength:0];
}

-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
    [responseData appendData:data];
}

-(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error  
{
    NSLog(@"error %@",error);
}

-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    [connection release];

    NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];

    [responseData release];

    jsonArray = [responseString JSONValue];

    NSLog(@"array %@",jsonArray);



}

in my NSLog(@"array %@",jsonArray); i can see all records,everything is ok. But in my tableview nothing at the screen.

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [jsonArray count];
}

// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }

    // Configure the cell.

    NSDictionary *dico = [self.jsonArray objectAtIndex:indexPath.row];
    cell.textLabel.text = [dico objectForKey:@"name"];


    return cell;
}

this code work on xcode 3 but not in xcode 4.

somes helps please.

  • 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-31T15:57:30+00:00Added an answer on May 31, 2026 at 3:57 pm

    After you finish loading the data, you need to tell your tableview to reload. I’m not seeing that in your code. Try something like this:

    -(void)connectionDidFinishLoading:(NSURLConnection *)connection
    {
        [connection release];
    
        NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    
        [responseData release];
    
        jsonArray = [responseString JSONValue];
    
        NSLog(@"array %@",jsonArray);
        /* This tells your tableView to reload */
        [tableView reloadData];
    }
    

    Also, make sure your TableView is connected in the designer via an IBOutlet. Otherwise your reloadData command will fall on deaf ears.

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

Sidebar

Related Questions

I just installed Xcode 3.2.3. I have a first generation iPhone that I use
I have just bought a VPS running Ubuntu and I need to install the
I have just installed VMWare Server 2.0 on a fresh Fedora Core 8 install.
I have few Core Data projects for MacOS started with Xcode 3 that behaves
I am fairly new to .NET development and have just installed a clean install
I have just installed Sequel using the command sudo macgem install sequel . It
I used this answer: Install xCode 3.2.3 w/ iPhone SDK 4, get "Base SDK
I just upgraded to Xcode 4. I have a project that is still dependent
I just downloaded the new xcode, 3.2.6 to try with the new sdk. I
I just downloaded Xcode 4.1 that comes with 4.3.2 sdk. I have built a

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.