Note that there are some explanatory texts on larger screens.

plurals
  1. POChange two sets of datatypes daily then reset them
    primarykey
    data
    text
    <p>I need to change two sets of image data and two sets of text data daily for an iOS app. The first image set is x1-13.png , the second is y1-20.png. In all there are 260 combinations (13x20 days) before they repeat the cycle. There are 2x260 sets of text data (textA, textB) that run along side. They have to corespond to specific gregorian dates and cycle through their combinations. The app will open, look at what date it is and load the corresponding data. It also needs to <strong>SKIP OVER A LEAP YEAR DAY (2/29)..</strong></p> <p>[Within the image 260combinations, there are are additional image combinations (example below) but I have worked out the various formulas/coding for these - they rely on both sets starting at day one (x1.png,y1.png)and will work on implementation.]</p> <p>At the moment all I can do manually change two sets of ints as counters to show different images. Eg:</p> <pre><code>int x = 2; int y = 2; -(void)getImage{ if (y) { UIImage *theYimg = [UIImage imageNamed:[NSString stringWithFormat:@"SetY%i.png", y]]; [MainImageView setImage:theYimg]; int additionalImagery; if ((x == 2 ||x == 7||x==12) &amp;&amp; y &lt;9) { additionalImagery = y + 12; UIImage *addimg = [UIImage imageNamed:[NSString stringWithFormat:@"SetY%i.png", additionalImagery]]; [secondImageView setImage:addimg]; UIImage *thirdimg = [UIImage imageNamed:[NSString stringWithFormat:@"SetX%i.png", x]]; [thirdImageView setImage:thirdimg]; } </code></pre> <p>Is there a loop that can count up (++) <strong>daily</strong> till they reach the end of the image set and then reset themselves from the first image again? - the equivalent of :</p> <pre><code>int x = 1; x &lt;=13; x++; //then reset to x=1 again after 13days int y = 1; y &lt;=20; y++; //then reset to y=1 again after 20days </code></pre> <p>The cycles will begin on the same day but obviously they will need to reset on different days.</p> <p>and <strong>equally importantly</strong></p> <p>How do I implement them in a daily schedule?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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