title: Show notification on a button after 45 minutes after the page gets load
body: <p>I am getting response from server,in which I am getting a NSDate parameter with time.I have a notification button on navigation bar.Whatever the time we are getting after 45 minutes we have to show the count of survey on notification button.After pressing the button user fills the survey which contains survey questions.But not before 45 minutes the user can see the notification.</p>
  
  <p>Now my code looks like this</p>
  
  <pre><code>-(void)checkForResponse:(HRNetworkDataModel *)dataModel
  {
      [HRUtility stopActivityIndicatorFromView:self.navigationController.view];
      if ([dataModel.responseData[@"community_details"][@"status"][@"message"]isEqualToString:@"successful"])
      {
          self.pendingSurveyArray = dataModel.responseData[@"community_details"][@"data"][@"community_details"];
          NSMutableArray *finalSurveyArray = [[NSMutableArray alloc] init];
          for (NSInteger i=0; i&lt;self.pendingSurveyArray.count;i++)
          {            NSDictionary *tDict = self.pendingSurveyArray[i];
             if((([tDict[@"survey_flag"] isEqualToNumber:[NSNumber numberWithBool:0]]) || [tDict[@"survey_flag"] isEqualToNumber:[NSNumber numberWithBool:0]]) ||[tDict[@"survey_flag"] isEqualToNumber:[NSNumber numberWithBool:0]])
   {
                   [finalSurveyArray addObject:tDict];
                   self.communityVisitedDate = tDict[@"visited_time"];
    }
  
          }
  
          if (finalSurveyArray.count == 0)
          {
              return;
          }
          else
          {
              dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 45 *60 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
                      [self.navigationItem.rightBarButtonItems[0] setBadgeValue:[NSString stringWithFormat:@"%lu",(unsigned long)finalSurveyArray.count]];
  
              });
  
          }
  
      }
  }
  </code></pre>
  
  <p>Any help will be appreciated.</p>