在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
用到知识:1.计时器NSTimer 2.UIWebView控件 3.NSURLRequest请求数据
- (void)refreshStock
{ NSString *url = [[NSString alloc] initWithString:@"http://g.foolcdn.com/charts/advanced/caps_advanced.chart?TIME_SPAN=1Y&RESOLUTION=D&SYMBOL_US=AAPL&ID_NOTATION=&IND_1=volume&CLOSE_LINE=0"]; [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]]; [url release]; } - (void)viewDidLoad { [super viewDidLoad]; [self refreshStock]; [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(refreshStock) userInfo:nil repeats:YES]; }
|
请发表评论