appDelegateからどのように異なる値を受け取ることができますか?多くのビューコントローラを追加します
@synthesize window;
@synthesize viewController;
@synthesize viewController2;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self.window addSubview:viewController2.view];
[self.window addSubview:viewController.view];
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (choix==6) {
XMLTestAppDelegate *appDelegatess = (BroseFormular2*)[[UIApplication sharedApplication] delegate];
appDelegatess.viewController2.detailItem =[listOfMovies objectAtIndex:indexPath.row];
}
else if (choix==7)
{
XMLTestAppDelegate *appDelegate = (BroseFormular2*)[[UIApplication sharedApplication] delegate];
appDelegate.viewController2.detailItem =[listOfMovies objectAtIndex:indexPath.row];
}
else {
NSLog(@"no");
XMLTestAppDelegate *appDelegates = (authe*)[[UIApplication sharedApplication] delegate];
appDelegates.viewController.detailItem =[listOfMovies objectAtIndex:indexPath.row];
}
iPhone、iPad、Macについて質問していますか? – progrmr
私はipadについて尋ねます –