菜鸟教程小白 发表于 2022-12-12 09:06:00

ios - 在 ios uitableview 中间歇性地获取 json 提要失败


                                            <p><p>我正在构建一个简单的 ios 应用程序,它试图显示来自 flickr 的图像序列。问题是它有时有效,有时失败,我不确定哪里出错了。
应用程序具有主详细信息 View 。当前未使用 Detailview,问题发生在主视图本身。我在 masterview 上设置了一个刷新按钮,并在用户尝试刷新时尝试重新获取数据。</p>

<p>github:<a href="https://github.com/kiranjulapalli/flickrexcercise" rel="noreferrer noopener nofollow">https://github.com/kiranjulapalli/flickrexcercise</a> </p>

<p>欣赏任何见解。</p>

<p>这是错误:</p>

<pre><code> JSON error: The operation couldn’t be completed. (Cocoa error 3840.)
</code></pre>

<p>代码如下:</p>

<pre><code>Header MasterViewController.h:
#import &lt;UIKit/UIKit.h&gt;
@interface MasterViewController : UITableViewController

@property (strong, nonatomic) NSMutableData* receivedData;
@property (strong, nonatomic) NSURLConnection *connection;
@property (strong, nonatomic) NSMutableArray* items;

@end
</code></pre>

<p>实现:</p>

<pre><code>- (void)viewDidLoad
{
    ;

    UIBarButtonItem *addButton = [ initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(fetchFlickrData)];
    self.navigationItem.rightBarButtonItem = addButton;
    ;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
    if ( items != nil )
    {
      return items.count;
    }
    else
    {
      return 0;
    }
}

- (UITableViewCell *)tableView:(UITableView *)tableView
         cellForRowAtIndexPath:(NSIndexPath *)indexPath
{   
    static NSString *CellIdentifier = @&#34;previewCell&#34;;

    previewCell *cell = ;

    if (cell == nil)
    {
      NSArray *nib = [ loadNibNamed:@&#34;previewCell&#34; owner:self options:nil];
      cell = ;
      cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    NSDictionary* item = ];

    NSString* url = [ objectForKey:@&#34;m&#34;];

   
                   placeholderImage:];
    return cell;
}
</code></pre>

<p>//获取数据</p>

<pre><code>-(bool)fetchFlickrData {
    // build the url for fetching json data
    NSString* url = ;

    // Escape the characters in the URL
    url = ;

    // Create the request.
    NSURLRequest *theRequest=
                                              cachePolicy:NSURLRequestUseProtocolCachePolicy
                                          timeoutInterval:20.0];

    connection=[ initWithRequest:theRequest delegate:self];

    if (connection)
    {
      self.receivedData = [init];
    }
    else
    { // Failed connection
      return false;
    }

    return true;
}

- (void)connection:(NSURLConnection *)connection
didReceiveResponse:(NSURLResponse *)response
{
    ;
}

- (void)connection:(NSURLConnection *)connection
    didReceiveData:(NSData *)data
{
    ;
}

- (void)connection:(NSURLConnection *)connection
didFailWithError:(NSError *)error
{
    receivedData = nil;
    NSLog(@&#34;Connection failed! Error - %@ %@&#34;,
          ,
          [ objectForKey:NSURLErrorFailingURLStringErrorKey]);
}
</code></pre>

<p>--</p>

<pre><code>- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    // do something with the data
    // receivedData is declared as a method instance elsewhere
    NSLog(@&#34;Succeeded! Received %d bytes of data&#34;,);

    NSString* stringcontents = [ initWithData:self.receivedData encoding:NSUTF8StringEncoding];

    NSData *jsonData = ;

    NSError *error = nil;

    NSDictionary *tempresults = jsonData ? : nil;

    if (error) {
</code></pre>

<p>//*代码从上面继续:
//这里是我看到错误的地方,而且大部分时间都发生了
//日志表明数据正常</p>

<pre><code>      NSLog(@&#34;[%@ %@] JSON error: %@&#34;, NSStringFromClass(), NSStringFromSelector(_cmd), error.localizedDescription);
      NSLog(@&#34;%@&#34;, stringcontents);
    }

    if ( !error )
    {

      NSDictionary* tempitems = ;

      if ( !items )
      { // Allocate the mutable array if not already allocated
            items = [init];
      }
      else
      {
            ;
      }

      for (NSDictionary* item in tempitems)
      {
            ;
      }
      ;
    }
    else
    {
      //Alert error
    }

    self.connection =nil;
}
</code></pre>

<p>抛出错误时的内容:</p>

<pre><code>{
      &#34;title&#34;: &#34;Uploads from everyone&#34;,
      &#34;link&#34;: &#34;http://www.flickr.com/photos/&#34;,
      &#34;description&#34;: &#34;&#34;,
      &#34;modified&#34;: &#34;2013-02-24T05:49:14Z&#34;,
      &#34;generator&#34;: &#34;http://www.flickr.com/&#34;,
      &#34;items&#34;: [
       {
            &#34;title&#34;: &#34;P1610143&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/jungandyu/8501768895/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8094/8501768895_2e05d3d266_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-16T12:20:10-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/jungandyu/\&#34;&gt;Bighead City&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/jungandyu/8501768895/\&#34; title=\&#34;P1610143\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8094/8501768895_2e05d3d266_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;180\&#34; alt=\&#34;P1610143\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:14Z&#34;,
            &#34;author&#34;: &#34;[email protected] (Bighead City)&#34;,
            &#34;author_id&#34;: &#34;19809616@N08&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;20121231-DSC08686.jpg&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/wasicat/8501768957/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8385/8501768957_23f8a2fdcc_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2012-12-31T12:52:35-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/wasicat/\&#34;&gt;William0912&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/wasicat/8501768957/\&#34; title=\&#34;20121231-DSC08686.jpg\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8385/8501768957_23f8a2fdcc_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;180\&#34; alt=\&#34;20121231-DSC08686.jpg\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &lt;p&gt;201301015鎮西堡跨年&lt;br /&gt; 明新登山社&lt;\/p&gt;&#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:16Z&#34;,
            &#34;author&#34;: &#34;[email protected] (William0912)&#34;,
            &#34;author_id&#34;: &#34;81613772@N00&#34;,
            &#34;tags&#34;: &#34;鎮西堡 friendlyflickr 201301015鎮西堡跨年 明新登山社&#34;
       },
       {
            &#34;title&#34;: &#34;IMAG0710&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/84380329@N08/8501769085/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8231/8501769085_1433e589fe_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2012-10-27T22:30:28-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/84380329@N08/\&#34;&gt;bmota2007&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/84380329@N08/8501769085/\&#34; title=\&#34;IMAG0710\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8231/8501769085_1433e589fe_m.jpg\&#34; width=\&#34;135\&#34; height=\&#34;240\&#34; alt=\&#34;IMAG0710\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:20Z&#34;,
            &#34;author&#34;: &#34;[email protected] (bmota2007)&#34;,
            &#34;author_id&#34;: &#34;84380329@N08&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;IMAG0157.jpg&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/58459890@N08/8501769129/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8532/8501769129_8becb3ccae_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2012-09-08T23:55:12-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/58459890@N08/\&#34;&gt;k7801101&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/58459890@N08/8501769129/\&#34; title=\&#34;IMAG0157.jpg\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8532/8501769129_8becb3ccae_m.jpg\&#34; width=\&#34;160\&#34; height=\&#34;240\&#34; alt=\&#34;IMAG0157.jpg\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:22Z&#34;,
            &#34;author&#34;: &#34;[email protected] (k7801101)&#34;,
            &#34;author_id&#34;: &#34;58459890@N08&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;The Press - Work at Rockville Metro Plaza I&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/nakevanc/8501769159/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8234/8501769159_c68af16b82_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-24T00:45:53-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/nakevanc/\&#34;&gt;Nakeva&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/nakevanc/8501769159/\&#34; title=\&#34;The Press - Work at Rockville Metro Plaza I\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8234/8501769159_c68af16b82_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;180\&#34; alt=\&#34;The Press - Work at Rockville Metro Plaza I\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:22Z&#34;,
            &#34;author&#34;: &#34;[email protected] (Nakeva)&#34;,
            &#34;author_id&#34;: &#34;28116601@N02&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;BHS BBall Region Quarterfinals_1077.JPG&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/kbaumann/8501769163/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8231/8501769163_3e54304c40_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-23T18:32:15-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/kbaumann/\&#34;&gt;kjbaumann&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/kbaumann/8501769163/\&#34; title=\&#34;BHS BBall Region Quarterfinals_1077.JPG\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8231/8501769163_3e54304c40_m.jpg\&#34; width=\&#34;159\&#34; height=\&#34;240\&#34; alt=\&#34;BHS BBall Region Quarterfinals_1077.JPG\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:22Z&#34;,
            &#34;author&#34;: &#34;[email protected] (kjbaumann)&#34;,
            &#34;author_id&#34;: &#34;33453969@N04&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;DSC_1458&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/eddilui/8501769217/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8099/8501769217_43f83ea28b_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-01-09T23:43:06-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/eddilui/\&#34;&gt;Eddi Lui&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/eddilui/8501769217/\&#34; title=\&#34;DSC_1458\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8099/8501769217_43f83ea28b_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;160\&#34; alt=\&#34;DSC_1458\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:24Z&#34;,
            &#34;author&#34;: &#34;[email protected] (Eddi Lui)&#34;,
            &#34;author_id&#34;: &#34;68014013@N08&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;DSC_0112&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/pjkdmd/8501769273/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8233/8501769273_63a9bb7206_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-23T22:00:09-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/pjkdmd/\&#34;&gt;pjkdmd&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/pjkdmd/8501769273/\&#34; title=\&#34;DSC_0112\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8233/8501769273_63a9bb7206_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;159\&#34; alt=\&#34;DSC_0112\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:25Z&#34;,
            &#34;author&#34;: &#34;[email protected] (pjkdmd)&#34;,
            &#34;author_id&#34;: &#34;81759199@N08&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;8499469359_a854f58ba3_z&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/ury94/8501769293/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8093/8501769293_f19a12de4f_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-24T06:49:26-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/ury94/\&#34;&gt;Hồng Anh ®&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/ury94/8501769293/\&#34; title=\&#34;8499469359_a854f58ba3_z\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8093/8501769293_f19a12de4f_m.jpg\&#34; width=\&#34;160\&#34; height=\&#34;240\&#34; alt=\&#34;8499469359_a854f58ba3_z\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:26Z&#34;,
            &#34;author&#34;: &#34;[email protected] (Hồng Anh ®)&#34;,
            &#34;author_id&#34;: &#34;39951352@N03&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;Punggol End&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/eideticme/8502873874/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8242/8502873874_790c93ed5b_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2012-05-26T23:29:17-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/eideticme/\&#34;&gt;eidetic.me&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/eideticme/8502873874/\&#34; title=\&#34;Punggol End\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8242/8502873874_790c93ed5b_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;160\&#34; alt=\&#34;Punggol End\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:14Z&#34;,
            &#34;author&#34;: &#34;[email protected] (eidetic.me)&#34;,
            &#34;author_id&#34;: &#34;76188829@N02&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;IMG_0597&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/mediaocu/8502873916/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8381/8502873916_a9cb6e726a_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-23T04:39:39-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/mediaocu/\&#34;&gt;MediaOCU&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/mediaocu/8502873916/\&#34; title=\&#34;IMG_0597\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8381/8502873916_a9cb6e726a_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;160\&#34; alt=\&#34;IMG_0597\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &lt;p&gt;The OCU spirit squad performed at a spirit competition in the Henry J Freede activity and wellness center on Saturday afternoon.&lt;br /&gt; &lt;br /&gt; The Campus/Michael Horn&lt;\/p&gt;&#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:16Z&#34;,
            &#34;author&#34;: &#34;[email protected] (MediaOCU)&#34;,
            &#34;author_id&#34;: &#34;86702597@N04&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;Squaw Valley ski trip&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/hallucinant/8502873920/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8391/8502873920_e207276293_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-22T10:30:59-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/hallucinant/\&#34;&gt;hallucinant&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/hallucinant/8502873920/\&#34; title=\&#34;Squaw Valley ski trip\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8391/8502873920_e207276293_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;160\&#34; alt=\&#34;Squaw Valley ski trip\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:16Z&#34;,
            &#34;author&#34;: &#34;[email protected] (hallucinant)&#34;,
            &#34;author_id&#34;: &#34;62641951@N00&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;053/365&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/originalrocker/8502873948/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8385/8502873948_06c8800be5_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-22T19:37:35-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/originalrocker/\&#34;&gt;originalrocker&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/originalrocker/8502873948/\&#34; title=\&#34;053/365\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8385/8502873948_06c8800be5_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;180\&#34; alt=\&#34;053/365\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &lt;p&gt;worst feeling ever: when your little one is feeling bad with a high fever, and you can only do so much. :(&lt;\/p&gt;&#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:17Z&#34;,
            &#34;author&#34;: &#34;[email protected] (originalrocker)&#34;,
            &#34;author_id&#34;: &#34;49882128@N00&#34;,
            &#34;tags&#34;: &#34;max project day ruben tracy 365 homies guzman maximiliano 2013 365dayproject uploaded:by=flickrmobile flickriosapp:filter=nofilter&#34;
       },
       {
            &#34;title&#34;: &#34;Oh qu\&#39;il est haut, le pont du Bono...&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/dyc56/8502873962/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8239/8502873962_a1851d4140_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-01-13T16:24:20-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/dyc56/\&#34;&gt;DYC56&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/dyc56/8502873962/\&#34; title=\&#34;Oh qu\&#39;il est haut, le pont du Bono...\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8239/8502873962_a1851d4140_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;204\&#34; alt=\&#34;Oh qu\&#39;il est haut, le pont du Bono...\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:17Z&#34;,
            &#34;author&#34;: &#34;[email protected] (DYC56)&#34;,
            &#34;author_id&#34;: &#34;76919092@N08&#34;,
            &#34;tags&#34;: &#34;bridge france art soleil eau lumière pierre bretagne breizh pont bateau morbihan soe hdr bois nikond700 ahhhlafrance nikonpassion pixeliste nikkor1424mmf28g bretagnesanspareil mordusdephotos bouboun56&#34;
       },
       {
            &#34;title&#34;: &#34;Playing a rehearsal tomorrow and the lead sheets will be only on my iPad. Lets see how this goes!&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/jasondegenhardt/8502874026/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8245/8502874026_c39b545160_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-23T23:49:19-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/jasondegenhardt/\&#34;&gt;jasondeg&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/jasondegenhardt/8502874026/\&#34; title=\&#34;Playing a rehearsal tomorrow and the lead sheets will be only on my iPad. Lets see how this goes!\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8245/8502874026_c39b545160_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;240\&#34; alt=\&#34;Playing a rehearsal tomorrow and the lead sheets will be only on my iPad. Lets see how this goes!\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:19Z&#34;,
            &#34;author&#34;: &#34;[email protected] (jasondeg)&#34;,
            &#34;author_id&#34;: &#34;40834611@N06&#34;,
            &#34;tags&#34;: &#34;square squareformat iphoneography instagramapp uploaded:by=instagram foursquare:venue=50daa303e4b019a9f2725785&#34;
       },
       {
            &#34;title&#34;: &#34;IMG_0588&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/hmclin/8502874044/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8383/8502874044_7caebe46c5_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-23T18:01:42-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/hmclin/\&#34;&gt;Henry McLin&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/hmclin/8502874044/\&#34; title=\&#34;IMG_0588\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8383/8502874044_7caebe46c5_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;160\&#34; alt=\&#34;IMG_0588\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:20Z&#34;,
            &#34;author&#34;: &#34;[email protected] (Henry McLin)&#34;,
            &#34;author_id&#34;: &#34;95014738@N00&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/n28307/8502874096/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8228/8502874096_2494bd2d14_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-23T09:29:12-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/n28307/\&#34;&gt;beltz6&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/n28307/8502874096/\&#34; title=\&#34;\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8228/8502874096_2494bd2d14_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;160\&#34; alt=\&#34;\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:21Z&#34;,
            &#34;author&#34;: &#34;[email protected] (beltz6)&#34;,
            &#34;author_id&#34;: &#34;23089307@N02&#34;,
            &#34;tags&#34;: &#34;mesa ucsb universityofcalifornia afsdxvrzoomnikkor18200mmf3556gifedii&#34;
       },
       {
            &#34;title&#34;: &#34;bristow_party_124&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/amyherndonphotography/8502874102/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8236/8502874102_7192f5c6f0_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-17T00:16:46-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/amyherndonphotography/\&#34;&gt;amy herndon&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/amyherndonphotography/8502874102/\&#34; title=\&#34;bristow_party_124\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8236/8502874102_7192f5c6f0_m.jpg\&#34; width=\&#34;180\&#34; height=\&#34;240\&#34; alt=\&#34;bristow_party_124\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:22Z&#34;,
            &#34;author&#34;: &#34;[email protected] (amy herndon)&#34;,
            &#34;author_id&#34;: &#34;62464749@N08&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;100_1764&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/lelikadgi/8502874124/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8237/8502874124_9a7a7f356e_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2005-08-17T12:46:26-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/lelikadgi/\&#34;&gt;lelikadgi&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/lelikadgi/8502874124/\&#34; title=\&#34;100_1764\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8237/8502874124_9a7a7f356e_m.jpg\&#34; width=\&#34;180\&#34; height=\&#34;240\&#34; alt=\&#34;100_1764\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:22Z&#34;,
            &#34;author&#34;: &#34;[email protected] (lelikadgi)&#34;,
            &#34;author_id&#34;: &#34;77157992@N04&#34;,
            &#34;tags&#34;: &#34;&#34;
       },
       {
            &#34;title&#34;: &#34;@eliseebrown&#34;,
            &#34;link&#34;: &#34;http://www.flickr.com/photos/jj_delrosario/8502874178/&#34;,
            &#34;media&#34;: {&#34;m&#34;:&#34;http://farm9.staticflickr.com/8376/8502874178_5c32893a8e_m.jpg&#34;},
            &#34;date_taken&#34;: &#34;2013-02-24T00:49:24-08:00&#34;,
            &#34;description&#34;: &#34; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/people/jj_delrosario/\&#34;&gt;jj_delrosario&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&#34;http://www.flickr.com/photos/jj_delrosario/8502874178/\&#34; title=\&#34;@eliseebrown\&#34;&gt;&lt;img src=\&#34;http://farm9.staticflickr.com/8376/8502874178_5c32893a8e_m.jpg\&#34; width=\&#34;240\&#34; height=\&#34;240\&#34; alt=\&#34;@eliseebrown\&#34; /&gt;&lt;\/a&gt;&lt;\/p&gt; &#34;,
            &#34;published&#34;: &#34;2013-02-24T05:49:24Z&#34;,
            &#34;author&#34;: &#34;[email protected] (jj_delrosario)&#34;,
            &#34;author_id&#34;: &#34;57743051@N03&#34;,
            &#34;tags&#34;: &#34;square squareformat iphoneography instagramapp uploaded:by=instagram foursquare:venue=4b7e974ef964a5203df42fe3&#34;
       }
      ]
}
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>使用 <code>NSLog(@"%@", );</code> 进一步调试问题。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 在 ios uitableview 中间歇性地获取 json 提要失败,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/15048955/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/15048955/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 在 ios uitableview 中间歇性地获取 json 提要失败