我有一个iPhone应用程序,应该显示地图上无限数量的用户的位置。
我想要做的方式是每隔5-8秒向服务器发送一个请求,并获得用户的最佳位置。此外,每个用户每隔5-8秒自动将其位置发送到服务器。
有没有其他或更有价值的方法来做到这一点?
发布于 2012-12-19 15:42:04
你可以使用NSTimer
来完成这个任务,这是最好的方法。
[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(sendYourRequest:) userInfo:nil repeats:YES];
https://stackoverflow.com/questions/13945689
复制相似问题