title: Get value from another method
body: <p>I am trying to use data that I have placed on the same class but in a different method (I believe that is the terminology) but I cannot seem to access this data for some odd reason. I can do so when I place it all together (in the timer) but that would consume a TONNE of memory would it not since it would be setting this data over and over. Anyway, this is my code so far:</p>
  
  <pre><code> /////////////////////////////////SET TIME/DAYS///////////////////
      currentTime = [NSDate date];
      NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
      [timeFormatter setTimeStyle:NSDateFormatterShortStyle];
      self.timeNow.text = [timeFormatter stringFromDate:currentTime];
  
      NSDate *lesson1Start = [timeFormatter dateFromString:@"8:40"];
      NSDate *lesson2Start = [timeFormatter dateFromString:@"9:35"];
      NSDate *recessStart = [timeFormatter dateFromString:@"10:30"];
      NSDate *caregroupStart = [timeFormatter dateFromString:@"10:50"];
      NSDate *lesson3Start = [timeFormatter dateFromString:@"11:00"];
      NSDate *lesson4Start = [timeFormatter dateFromString:@"11:55"];
      NSDate *lunchStart = [timeFormatter dateFromString:@"12:50"];
      NSDate *lesson5Start = [timeFormatter dateFromString:@"1:30"];
      NSDate *lesson6Start = [timeFormatter dateFromString:@"2:20"];
      NSDate *endDay = [timeFormatter dateFromString:@"3:10"];
  
      }
      //////////////////////////END SET TIMES/////////////////////////
  
  
  - (void)updateTime {
  
      NSString *mondayDay = (@"Monday");
      NSString *tuesdayDay = (@"Tuesday");
      NSString *wednesdayDay = (@"Wednesday");
      NSString *thursdayDay = (@"Thursday");
      NSString *fridayDay = (@"Friday");
  
      [updateTimer invalidate];
      updateTimer = nil;
  
      currentTime = [NSDate date];
      NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
      [timeFormatter setTimeStyle:NSDateFormatterShortStyle];
      self.timeNow.text = [timeFormatter stringFromDate:currentTime];
  
      updateTimer = [NSTimer scheduledTimerWithTimeInterval:0.01
                              target:self
                              selector:@selector(updateTime)
                              userInfo:Nil repeats:YES];
  
     ///////Check day/time &amp; update lesson/////
  
      if (self.dayNow.text == mondayDay &amp;&amp; self.timeNow.text == lesson1Start) {
          NSLog(@"");
      }
  </code></pre>
  
  <p>As you can see, I cannot use "lesson1Start" since it is not in <code>- (void)updateTime</code>.</p>
  
  <p>Would it be fine if I did bundle it all noting that it would be setting this data over and over since it is placed in the timer.</p>
  
  <p>PS: I am trying to check if when the lesson starts and if the time is when the lesson starts then the lesson would appear. In this case I just have <code>NSLog(@"")</code>.</p>