Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand you correctly, you want to put an object into an array and then use that array to populate a table view?</p> <p>Just add the date object each time to the NSMutableArray.</p> <pre><code>[myArray addObject:dateObject]; </code></pre> <p>Then when it comes to populating the table view..</p> <pre><code>DateObject *newDateObj = [myArray objectAtIndex:index]; </code></pre> <p>I hope this helps and I understood your question</p> <p><strong>EDIT</strong> To answer now I understand a bit more.</p> <p><strong>Step 1</strong> Check through the existing array of dates and see if there are any that match maybe by iterating through it using a for loop. Search online for how to compare NSDate.</p> <p><strong>Step 2</strong> If it <strong>doesn't</strong> match any then insert it into the array as an array with just that date on it's own so the array count will be one. If it <strong>does</strong> match then insert it into the array along with that one making the array count 2 or more.</p> <p><strong>Step 3</strong> When it comes to declaring the section amount for the table just return the dateHolderArray count.</p> <p><strong>Step 4</strong> When declaring the amount of rows in each section, return the array count for the array thats inside the dateHolderArray.</p> <p><strong>Step 5</strong> Display the content when it comes to populating the cells with information. It becomes just a task of getting the dates from the arrays using the section ids and row ids.</p> <p>This is how I would do it, there are probably many other methods. Any questions just ask</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload