Slider Range WebService Call

I have a double slider. When the slider value is updated, we want to call the Webservice. I want to call min and max the final value, but they require tracking every value in the path. I edited this code for the first time, but after they don't work. because the method is static once. Is there any method that gets called exactly once when the method is called.

- (void)report:(RangeSlider *)sender {
     NSString *rupee=@"\u20B9";
    min=slider.min *1000;
     max=slider.max *1000;

    minValue =(int)min;
    maxValue =(int)max;


    NSString *report = [NSString stringWithFormat:@"%@ %d - %@ %d",rupee, (int)min,rupee, (int)max];
    reportLabel.text = report;
    reportLabel.textColor =[UIColor whiteColor];


    NSString *email=     [[NSUserDefaults standardUserDefaults] stringForKey:@"token"];
    NSString *ids=     [[NSUserDefaults standardUserDefaults] stringForKey:@"id"];



       static dispatch_once_t once;
dispatch_once(&once, ^ {
    double delayInSeconds = 5.0;
    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
        if ([searchBar.text isEqualToString:@""]) {
            NSDictionary *dict=[WebService searchByPrice:ids :email :minValue :maxValue];
            responseArray =[dict objectForKey:@"result"];

            NSLog(@"%@",responseArray);


            [table reloadData];


        }
    });

});


}

      

+1


source to share





All Articles