zoukankan      html  css  js  c++  java
  • ios小程序 股票更新

    用到知识: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];

     

     

  • 相关阅读:
    杭电2060WA
    杭电2060
    UVa10082 没有通过
    百度笔试题目02
    百度笔试题目01
    Q1002 四则运算
    百度笔试题目
    约瑟夫环 详细的分析
    算法导论03
    汉诺塔01
  • 原文地址:https://www.cnblogs.com/hanjun/p/2804568.html
Copyright © 2011-2022 走看看