Well, I have a TableView in a RootViewController with a DetailViewController to display information about a single record. On the Details page, I need to play a multimedia file, and I use MediaPlayer in accordance with this guide: http://www.techotopia.com/index.php/Video_Playback_from_within_an_iOS_4_iPhone_Application
Everything seems to be fine, but when I press the play button, I have this error:
-[DetailsViewController playmovie]: unrecognized selector sent to instance 0x9117f60 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DetailsViewController playmovie]: unrecognized selector sent to instance 0x9117f60'
These are my files:
In AppDelegate, I use this navigation controller:
[...] // Create a table view controller RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain]; rootViewController.managedObjectContext = context; rootViewController.entityName = @"Porti"; UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; self.navigationController = aNavigationController; UIBarButtonItem *homeButton; homeButton = [[[UIBarButtonItem alloc] initWithTitle:@" Inizio " style:UIBarButtonItemStyleBordered target:self action:@selector(home)] autorelease]; UIBarButtonItem *barButton; barButton = [[[UIBarButtonItem alloc] initWithTitle:@" Mappa dei porti " style:UIBarButtonItemStyleBordered target:self action:@selector(caricamappa)] autorelease]; [toolbar setItems:[NSArray arrayWithObjects: homeButton, barButton, nil]]; [window addSubview:[navigationController view]]; [window addSubview:toolbar]; [window makeKeyAndVisible]; [rootViewController release]; [aNavigationController release];
and in the RootViewController . I use this instruction to go to the DetailViewController:
DetailsViewController.h
, and this is DetailsViewController.m
My question is: where is my mistake? I assume this is a call to the playmovie method, but I cannot figure out the solution!
PS
I accidentally deleted a comment, I'm so sorry! = (
source share