2011-06-10 8 views
1

MWFeedParser를 사용하여 테이블 뷰에 URL을 가져 오려고합니다. 설명서를 읽고 item.enclosures (NSDictionary의 NSArray에 url, type 및 length 키 사용)에 액세스 할 수 있음을 알았습니다. 배열에서 URL에 액세스하고 싶습니다. NSDictionary의 NSArray 값에 액세스하는 방법을 알아내는 데 도움이 필요하며 지금까지 내가 가진 것입니다.NSDictionary의 NSArray 값에 액세스

if (indexPath.section == SectionHeader && indexPath.row == SectionHeaderEnclosure) { 
    if (item.enclosures) { 
     for (NSDictionary *url in item.enclosures){ 
      //How to access here; 
     } 
    } 
} 

답변

1
if (indexPath.section == SectionHeader && indexPath.row == SectionHeaderEnclosure) { 
    if (item.enclosures) { 
     for (NSDictionary *dict in item.enclosures){ 
      NSString *url = [dict objectForKey:@"url"]; 
      NSLog(@" url is : %@",url); 
     } 
    } 
} 
+0

신난다! 고맙습니다! –

+0

@CKallemeres 환영합니다 :) – Tatvamasi

관련 문제