Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 来自频道rss提要的Youtube缩略图?_Ios_Rss_Youtube_Thumbnails_Xcode4.5 - Fatal编程技术网

Ios 来自频道rss提要的Youtube缩略图?

Ios 来自频道rss提要的Youtube缩略图?,ios,rss,youtube,thumbnails,xcode4.5,Ios,Rss,Youtube,Thumbnails,Xcode4.5,我正在尝试将youtube频道的提要加载到带有rss提要的uitableview中。我需要这个来显示各个视频的缩略图。我只能使用gdata客户端找到这个,但它不起作用。以下是我目前掌握的代码: 视频。h: #import <UIKit/UIKit.h> @interface Videos : UITableViewController<NSXMLParserelegate>{ IBOutlet UITableView * newsTable; UIActivityInd

我正在尝试将youtube频道的提要加载到带有rss提要的uitableview中。我需要这个来显示各个视频的缩略图。我只能使用gdata客户端找到这个,但它不起作用。以下是我目前掌握的代码:

视频。h:

#import <UIKit/UIKit.h>

@interface Videos : UITableViewController<NSXMLParserelegate>{
IBOutlet UITableView * newsTable;
UIActivityIndicatorView * activityIndicator;

CGSize cellSize;

NSXMLParser * rssParser;

NSMutableArray * stories;


// a temporary item; added to the "stories" array one at a time, and cleared for the     next one
NSMutableDictionary * item;

// it parses through the document, from top to bottom...
// we collect and cache each sub-element value, and then save each item to our array.
// we use these to track each current item, until it's ready to be added to the "stories" array
NSString * currentElement;
NSMutableString * currentTitle, * currentDate, * currentSummary, * currentLink;
}
- (void)parseXMLFileAtURL:(NSString *)URL;

@end
代码应该放在哪里,代码是什么?
谢谢

这里有一个缩略图url

http://img.youtube.com/vi/VIDEOIDHERE/0.jpg
http://img.youtube.com/vi/VIDEOIDHERE/1.jpg
http://img.youtube.com/vi/VIDEOIDHERE/2.jpg
http://img.youtube.com/vi/VIDEOIDHERE/3.jpg
将为您获取任何视频的缩略图。数字表示质量,零表示最高。例如:

http://img.youtube.com/vi/F2Jko4Ipdrs/0.jpg

有一个缩略图url

http://img.youtube.com/vi/VIDEOIDHERE/0.jpg
http://img.youtube.com/vi/VIDEOIDHERE/1.jpg
http://img.youtube.com/vi/VIDEOIDHERE/2.jpg
http://img.youtube.com/vi/VIDEOIDHERE/3.jpg
将为您获取任何视频的缩略图。数字表示质量,零表示最高。例如:

http://img.youtube.com/vi/F2Jko4Ipdrs/0.jpg

您在当前元素中有视频id(至少有url)。这样,您就可以使用上面的URL(请参见:)创建UIImage并将其附加到表单元格中。这里有一个示例实现:您能发布我应该添加的代码吗?我似乎不知道应该添加什么。您在当前元素中有视频id(至少有url)。这样,您就可以使用上面的URL(请参见:)创建UIImage并将其附加到表单元格中。这里有一个示例实现:您能发布我应该添加的代码吗?我似乎不明白我应该补充什么。