私のUITableViewには(Google、Facebook、Yahoo)があり、選択に基づいて、そのページにリダイレクトする必要があります
何を書く必要がありdidSelectRowAtIndexPath
ますか?
私のUITableViewには(Google、Facebook、Yahoo)があり、選択に基づいて、そのページにリダイレクトする必要があります
何を書く必要がありdidSelectRowAtIndexPath
ますか?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[[statuses objectAtIndex:indexPath.row] valueForKey:@"LoginUrl"]]];
}
あなたの鍵が LoginUrl
次のコードを使用します: 選択コードを以下に配置するか、カスタム初期化を介して、選択した値を単一の値にコントローラーに渡し、送信された値に基づいて処理します
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self moveToNewViewControllerForRow:(indexPath.row)];
}
-(void)moveToNewViewControllerForRow:(NSInteger)forTheRow{
switch (forTheRow) {
case 0:
{
}
break;
case 1 :
{
}
break;
case 2 :
{
}
break;
}
}