5
RSS 피드를 nsmutablearray로 읽고 있습니다. 나는 XML 피드를 검색하고 싶다. 그 때문에 nsmutablearray를 검색하고 싶습니다. 나는 아주 새로운 아이폰 애플 리케이션입니다. 할 수있는이 몇 가지 일 helpme ..객관적인 c-iPhone 응용 프로그램에서 nsmutablearray를 검색하는 방법
덕분에,
RSS 피드를 nsmutablearray로 읽고 있습니다. 나는 XML 피드를 검색하고 싶다. 그 때문에 nsmutablearray를 검색하고 싶습니다. 나는 아주 새로운 아이폰 애플 리케이션입니다. 할 수있는이 몇 가지 일 helpme ..객관적인 c-iPhone 응용 프로그램에서 nsmutablearray를 검색하는 방법
덕분에,
:
NSMutableArray* names = [NSMutableArray arrayWithObjects:@"Andy", @"Bart", @"Bob", nil];
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"SELF beginswith[c] 'b'"];
NSArray* namesStartingWithB = [names filteredArrayUsingPredicate: predicate];
// namesStartingWithB now contains @"Bart" & @"Bob"
당신은 더의 NSArray 및 NSPredicate 문서를 봐야한다 정보. XML 구문 분석과 관련된 정보 (예 : RSS 피드)를 알고 있다면 Matt Gallagher의 기사 using libxml2 for XML parsing and XPath queries in Cocoa을 확인해야합니다.
추가 된 문서 링크 –
shouldnt NSArray * namesStartingWithB = [array filteredArrayUsingPredicate : predicate]; be NSArray * namesStartingWithB = [names filteredArrayUsingPredicate : predicate]; –
@James 고개를 숙고 해 주셔서 고맙습니다. –