Hi I have here a code from didSelectRowAtIndexPath
, and my problem is i cannot use switch
case by calling a UIViewController
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
TaskList *account = nil;
if (indexPath.section == 0) {
account = [_forCheckerList objectAtIndex:indexPath.row];
}else if (indexPath.section == 1) {
account = [_forApprovalList objectAtIndex:indexPath.row];
}else{
account = [_forVerificationList objectAtIndex:indexPath.row];
}
NSDictionary *funcColors = (NSDictionary*)[dict objectForKey:@"funcTags"];
int tag = [[funcColors objectForKey:[account funcCd]] intValue];
FundTransferOwnViewController *sc = [[FundTransferOwnViewController alloc]init];
[self.navigationController pushViewController:sc animated:YES];
switch (tag) {
case 10: //aca
AutoCreditViewController *sc = [[AutoCreditViewController alloc]init];
[self.navigationController pushViewController:sc animated:YES];
break;
default:
break;
}}
On case 10, i am calling AutoCreditViewController
, it always prompts with a red exclamation point saying "Expected Expression".