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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:54:18+00:00 2026-05-30T14:54:18+00:00

I have developed a application where i am fetching data from core data and

  • 0

I have developed a application where i am fetching data from core data and i am displaying it in a table view. I got everything fine until fetching the data but while inserting them to table view only the last entry is displaying in the table view. Below is the code i have written please preview and help me to get the solution.

 Deviceinfo *app = [arr objectAtIndex:indexPath.row];
switch(indexPath.row)
{


case 0:  
        NSLog(@"%@",app.platform);
        cell.textLabel.text = @"platform";
        cell.detailTextLabel.text =[app platform];

case 1:
        NSLog(@"%@",app.model);
        cell.textLabel.text = @"model";
        cell.detailTextLabel.text = [app model];
case 2:
        NSLog(@"%@",app.mac_address);
        cell.textLabel.text = @"mac address";
        cell.detailTextLabel.text = [app mac_address]; 
}
return cell;

I implement this code in the cellForRowAtIndexpath delegate. I am getting only the mac address in table view. hoping for better solution

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-05-30T14:54:19+00:00Added an answer on May 30, 2026 at 2:54 pm

    Insert break statements after each case, otherwise the case will just fall though to the next one

    switch(x) {
        case 1:
            break;
        default:
            break;
    }
    

    Based on your additional comments, try something like the following: Each device will have its own table view section and each section will have 3 table view rows, one for each piece of information.

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        return devices.count
    }
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
        return 3;
    }
    
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {        
        static NSString *CellIdentifier = @"Cell";
    
        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (!cell) {
            cell = [[FEMenuItemInfoCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];            
        }    
    
        Device *device = [devices objectAtIndex:indexPath.section];
    
        switch (indexPath.row) {
            case 0:
                cell.textLabel.text = @"platform";
                cell.detailTextLabel.text = [device platform]; 
                break;            
            case 1:
                cell.textLabel.text = @"model";
                cell.detailTextLabel.text = [device mac_address]; 
                break;
            case 2:
                cell.textLabel.text = @"mac address";
                cell.detailTextLabel.text = [device mac_address]; 
                break;                        
        }
    
        return cell;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed an application using Django and everything is working fine but I
I have developed a small application using Perl/Tk. The application will fetch data from
I have developed my application in .Net and my installer is working fine. Now
i have developed an application using jsf 1.2. it worked fine with apache tomcat
I have developed an application and installed it on my mobile. but i am
I have developed an application using J9 that runs in windows mobile. but now
I have an application which I developed about a year ago and I'm fetching
I have developed application for OCR using tesseract Library, Application got exit during the
I have developed an application in which the data About Schools are stored in
Currently we have developed application using Java 6 based on windows 32bit(Dual core &

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.