もう少し詳細を追加します。
addSubViewを使用するか、コントローラーをUITabBarControllerのビューにプッシュすることにより、既存のUIViewControllerのビューにビューを追加できます。後者の場合、UITabBarControllerはRootViewControllerを備えたUINavigationControllerである必要があります。
私は、これがあなたが言っていることだと思います。したがって、次のようなことを行います。
- (IBAction)PlaylistButtonPressed:(id)sender
{
// Load UIViewController from nib
MusicPick *music = [[MusicPick alloc] initWithNibName:@"MusicPick" bundle:nil];
// Add to UINavigationController's stack, i.e. the view for this UITabBarController view
[self.navController pushViewController:music animated:YES];
// Release music, no longer needed since it is retained by the navController
[music release];
}
これは、UITabBarControllerのビューとしてUINavigationControllerがあり、navControllerと呼ばれていることを前提としています。
UITabBarControllerのUIViewControllerのビューにUIViewを追加するだけの場合(オーバーレイなど)、すでに理解しているようにaddSubViewを使用でき、UINavigationControllerは必要ありません。