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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:26:14+00:00 2026-06-17T16:26:14+00:00

I have three data(date, view, textfield).I use SQLite(FMDB).and,It output to tableview. When you run

  • 0

I have three data(date, view, textfield).I use SQLite(FMDB).and,It output to tableview.
When you run this code, the same cell is output in all sections.I want to textfield and view in a cell for each date.I’m beginner,please tell me.

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    titleArry = [[NSMutableArray alloc] init ]; //タイトルを格納するための可変配列
    dateArray = [[NSMutableArray alloc] init ]; // 日付格納する可変配列
    contentsArry = [[NSMutableArray alloc] init ]; //画像を格納するための可変配列


    [DataModel selectTitle:titleArry];
    [DataModel selectDateTitle:dateArray]; 
    [DataModel selectContents:contentsArry];

    NSMutableSet *mutableSet = [NSMutableSet setWithArray:dateArray]; // 日付の重複を取り除く
    array = [mutableSet allObjects];

    [table reloadData];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return array.count;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return  contentsArry.count;
}


- (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.textLabel.text = [titleArry objectAtIndex:indexPath.row];
    cell.imageView.image = [[UIImage alloc] initWithData:[contentsArry objectAtIndex:indexPath.row]];

    return cell;
}
  • 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-17T16:26:15+00:00Added an answer on June 17, 2026 at 4:26 pm

    Select the right object in the array in the cellForRowAtIndexPath method:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        //get the right object (use the object that is in the array, this is just an example)
        NSObject *object = [array objectAtIndex:indexPath];
        cell.textLabel.text = object.title
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have query which returns the data like this DATE( expensemaster.`date` ) SUM( feesmaster.PAIDAMOUNT
I have something like this in my Project#show view: ... <p> <b>Start date:</b> <%=
I have three tables of data: table: cars [10,000 rows] table: planes [2,000 rows]
I have three tables. I have to retrieve the data using Linq statement. My
I have three select boxes :- select1 select2 select3 , i am fetching data
In the /data directory of solr, suppose, I have three folders named as index,
In my application, I have three collection objects which store data. The data which
Ok, here's the condensed form. I have three main tables to draw data from:
I have a three column workbook with the following data: Col A: Names Col
I have a three tier system, SQL Server backend, hand written data access layer,

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.