문제

I have a app code that sends in request only when the app opens. However I need to have a continuos access to the file in the server which will be updated every second.

-(void)viewDidLoad
{
    [super viewDidLoad];

    NSURL *myurl = [NSURL URLWithString:@"URL"];
    NSString *mystring = [NSString stringWithContentsOfURL:myurl encoding:NSASCIIStringEncoding error:nil];
    //myTextView.text = realtime;
    //NSLog(mystring);

    NSString *stripped1 = [mystring stringByReplacingOccurrencesOfString:@"\r" withString:@""];

    NSArray *rows = [stripped1 componentsSeparatedByString:@"\n"];
}

Is there a way that I can keep checking on my server file to load the data? Currently I can load it only once when I open the application. But its a live update application. Thank you.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top