1

iPhone/iPadで動作するはずのコースをコーディングするテーブルビューアプリがあります。電話部分は正常に機能し、iPad の分割ビューは問題ありませんが、ポップオーバーでアイテムを選択すると、右側のビュー コントローラーを変更できません。MasterViewController.m からの私のコードは次のとおりです。

#pragma mark - Sal's Methods

-(void) doAbout {
   NSLog(@"About");

    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
    AboutMe *vc = [[AboutMe alloc] initWithNibName:@"AboutMe" bundle:nil];
    [self.navigationController pushViewController:vc animated:YES];
    } else {
    AboutMe *vc = [[AboutMe alloc] initWithNibName:@"AboutMe_iPad" bundle:nil];
    [self.navigationController pushViewController:vc animated:YES];

    }



}


#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UISplitViewController *svc = self.splitViewController;
DetailViewController *rightVC = [svc.viewControllers objectAtIndex:1];

switch (indexPath.row) {
    case 0:
        [self doAbout];
        break;
    case 1:
        NSLog(@"Concurrency");
        break;
    case 2:
        NSLog(@"Sandbox");
        break;
    case 3:
        NSLog(@"Notification");
        break;
    case 4:
        NSLog(@"Email");
        break;
    case 5:
        NSLog(@"Mapkit");
        break;
    case 6:
        NSLog(@"Animate");
        break;
    case 7:
        NSLog(@"Contacts");
        break;
    case 8:
        NSLog(@"SQLlite");
        break;
    case 9:
        NSLog(@"Core Data");
        break;

    default:
        break;
}




}

@end
4

0 に答える 0