I'm trying to figure out why this code doesn't work. I'm trying to search if a string contains "|P". If it does, I want to do something.
NSMutableArray *list = [pView getPOIList];
NSString *cellValue = [list objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
NSArray *chunks = [cellValue componentsSeparatedByString: @"|P"];
//NSLog([[chunks count] stringValue]);
if([&chunks[1] isEqualToString:@"|P"]) {
//Do Something
}
This makes my app crash.