在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > iOS開(kāi)發(fā)常用的第三方類庫(kù)

            iOS開(kāi)發(fā)常用的第三方類庫(kù)

            作者: 時(shí)間:2016-10-08 來(lái)源:網(wǎng)絡(luò) 收藏
            // We don't want *all* the individual messages from the
            // SBJsonStreamParser, just the top-level objects. The stream
            // parser adapter exists for this purpose.
            adapter = [[SBJsonStreamParserAdapter alloc] init];
            // Set ourselves as the delegate, so we receive the messages
            // from the adapter.
            adapter.delegate = self;
            // Create a new stream parser..
            parser = [[SBJsonStreamParser alloc] init];
            // .. and set our adapter as its delegate.
            parser.delegate = adapter;
            // Normally it's an error if JSON is followed by anything but
            // whitespace. Setting this means that the parser will be
            // expecting the stream to contain multiple whitespace-separated
            // JSON documents.
            parser.supportMultipleDocuments = YES;
            }
            #pragma mark SBJsonStreamParserAdapterDelegate methods
            - (void)parser:(SBJsonStreamParser *)parser foundArray:(NSArray *)array {
            [NSExceptionraise:@unexpected format:@Should not get here];
            }
            - (void)parser:(SBJsonStreamParser *)parser foundObject:(NSDictionary *)dict {
            NSLog(@SBJson parser foundObject);
            // 處理返回的數(shù)據(jù)
            }
            // 使用ASIHTTPRequest請(qǐng)求測(cè)試
            - (void) loadData {
            __block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
            [request setRequestMethod:@POST];
            [request setCompletionBlock:^{
            // Use when fetching text data
            //NSString *responseString = [request responseString];
            // Use when fetching binary data
            NSData *responseData = [request responseData];
            NSLog(@Connection didReceiveData of length: %u, responseData.length);
            // Parse the new chunk of data. The parser will append it to
            // its internal buffer, then parse from where it left off in
            // the last chunk.
            SBJsonStreamParserStatus status = [parser parse:responseData];
            if (status == SBJsonStreamParserError) {
            NSLog(@Parser error: %@, parser.error);


            關(guān)鍵詞:

            評(píng)論


            相關(guān)推薦

            技術(shù)專區(qū)

            關(guān)閉