开发者

iphone uitableview populate - program exits without warning

I'm parsing data from a remote database to an iphone application and populating the table view. The program is able to populate the table view fine however its all the records. To sort the records i was advised to use NSPredicate to sort the data (which w开发者_开发问答orks) but when it tries to load the data, the program exists with no warnings in the console. I dont understand why, could someone have a quick glance over the code and tell me where im going wrong? (i think its something to do with these lines return [rows count]; and NSDictionary *dict = [rows objectAtIndex: indexPath.row];). Thanks for any help on this ...


In your viewDidLoad, retain the array and try.

    rows = [[courses filteredArrayUsingPredicate:predicate] retain];


You should retain the rows array since filteredArrayUsingPredicate should return an autorelease object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜