1
我在這個問題上很瘋狂: 我使用AQGridView來顯示從SQLite中檢索的數組中的某些圖像,但我無法使用SQLite過濾網格UISearchBar,我把它放在SplitViewController的Detail區域的TitleView中。你能幫助我通過一些邏輯或者通過一個例子嗎?如何使用UISearchBar過濾AQGridView中的單元格
謝謝!
我在這個問題上很瘋狂: 我使用AQGridView來顯示從SQLite中檢索的數組中的某些圖像,但我無法使用SQLite過濾網格UISearchBar,我把它放在SplitViewController的Detail區域的TitleView中。你能幫助我通過一些邏輯或者通過一個例子嗎?如何使用UISearchBar過濾AQGridView中的單元格
謝謝!
已解決!
重新計算陣列_icons後刪除所有對象..
[_icons removeAllObjects];
searching = YES;
NSInteger numeroElem = [subcatList getSize];
for (NSUInteger i = 0; i < numeroElem; i++)
{
NSDictionary *itemAtIndex = (NSDictionary *)[subcatList objectAtIndex:i];
NSString *titolo_cat = [itemAtIndex objectForKey:@"titolo"];
NSComparisonResult result = [titolo_cat compare:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch) range:NSMakeRange(0, [searchText length])];
if (result == NSOrderedSame)
{
ETC ETC.......
[_icons addObject: image];
}
};
如果你已經找到了答案,你自己的問題,最好將它張貼的「答案」,所以要清楚,你會也可以獲得回答你自己問題的徽章。 – Mahm00d 2012-04-21 07:33:36
謝謝,我已經完成了! – Firegab 2012-04-23 07:32:01