2013-01-18 1 views
1

좋아, 그래서이 일을 미친 듯이 찾기가 어렵다. 나는 사용자로부터 최신 유튜브 비디오를 UITableView에 넣는 방법을 찾기 위해 고심하고있다.YouTube in UITableView

나는이 시도했지만 그것은 유효 기간이 있고 난 오류의 힙 가져옵니다 jQuery과에 YouTube 동영상을 퍼팅에, 어떤 좋은 자습서, 그 일이되어있는 UIWebView를 사용에서 제외 http://code.google.com/p/gdata-objectivec-client/downloads/detail?name=gdata-objectivec-client-1.11.0.zip

를?

+0

는 예측 할 수 있었다 H2CO4 (또는 whateve 그는 불린다). 이것은 Xcode와는 아무런 관련이 없습니다. – Fogmeister

답변

1

UIView에서 재생할 YouTube 비디오를 얻을 수 있다면 UITableView 컨트롤러 셀에이를 삽입 할 수 있습니다.

2

예를 들어 Nethfel 사용자를 예로 들어 보겠습니다. 그의 재생 목록을 클릭하십시오; 링크 표시 줄에 당신은 "http://www.youtube.com/watch?v=4nx7g60Ldig & 목록 = UUANsW00CkQnNnnUyuC1cygw"

지금 .. 우리는 재생 목록 "수"를 가지고 UUANsW00CkQnNnnUyuC1cygw 표시되고 .. 우리는 할 것 JSON 당신은 JSONC와 JSON을 대체 할 수있는 50 개 결과

http://gdata.youtube.com/feeds/api/playlists/UUANsW00CkQnNnnUyuC1cygw?v=2&alt=jsonc&max-results=50

을 request..max - 당신 자체가 결과에 사소한 변경을 것이다; 이 앱의 시작 부분에 귀하의 요청이됩니다

이제

우리가해야한다 "해석/번역"다음 결과 : 등 제목, 미리보기, 페이지 링크 :

{ 
apiVersion: "2.1", 
data: { 
id: "UUANsW00CkQnNnnUyuC1cygw", 
author: "Nethfel", 
title: "Uploaded videos", 
description: "", 
thumbnail: { 
sqDefault: "http://i.ytimg.com/vi/4nx7g60Ldig/default.jpg", 
hqDefault: "http://i.ytimg.com/vi/4nx7g60Ldig/hqdefault.jpg" 
}, 
content: { 
5: "http://www.youtube.com/p/UUANsW00CkQnNnnUyuC1cygw" 
}, 
totalItems: 17, 
startIndex: 1, 
itemsPerPage: 50, 
items: [ 
{ 
id: "UUGCa8nZNU7uOfDF3zV9AxkJtJSuX5gHGI", 
position: 1, 
author: "Nethfel", 
video: { 
id: "4nx7g60Ldig", 
uploaded: "2011-11-02T12:32:03.000Z", 
updated: "2013-01-07T18:26:41.000Z", 
uploader: "nethfel", 
category: "Howto", 
title: "iOS Passing Data Between View Controllers Technique 1", 
description: "This video discusses one of the most basic techniques for passing data between view controllers in an iOS application. This technique uses storing a local iVar in one class and passing it to the second class about to be displayed on the screen. Although this is a very simple example using an NSString, it can be applied using any other type of data as well - whether it be a collection or a custom data model object.", 
thumbnail: { 
sqDefault: "http://i.ytimg.com/vi/4nx7g60Ldig/default.jpg", 
...... 

을 당신은 모든 요소가 ... 당신은 구문 분석이 JSON 응답을 (추출물)가 필요 .. 새로운 "상세"페이지를 열고, 셀을 클릭에 ...있는 TableView에

를 넣어 ... 당신은 LBYouTubeView for iOS