Je crée une application iPad, et j'ai deux classes:. NWRootViewController : UITableViewController
et UINewFeedViewController : UIViewController
En NWRootViewController
j'ai un UIBarButtonItem
, qui, quand on tape dessus, apparaît un contrôleur de vue modal appelé NWNewFeedViewController
:dismissModalViewControllerAnimated fait mon accident d'application :(
// THIS CODE IS IN NWROOTVIEWCONTROLLER.M
// New Feed
-(IBAction)showNewFeedViewAction:(id)sender {
[newFeedViewController setModalPresentationStyle:UIModalPresentationFormSheet];
[self presentModalViewController:newFeedViewController animated:YES];
}
cela fonctionne bien Cependant, dans l » avis NWNewFeedViewController
, j'ai une autre UIBarButtonItem
qui fait cela quand on tape dessus.
// THIS CODE IS IN NWNEWFEEDCONTROLLER.M
// Buttons
-(IBAction)cancelAction:(id)sender {
[self dismissModalViewControllerAnimated:YES];
}
quand je t ap ce bouton, l'application se bloque avec:
2010-04-10 12:39:46.703 News[580:207] *** -[NWDetailViewController cancelAction:]: unrecognized selector sent to instance 0x4741110
2010-04-10 12:39:46.705 News[580:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NWDetailViewController cancelAction:]: unrecognized selector sent to instance 0x4741110'
2010-04-10 12:39:46.705 News[580:207] Stack: (
40878667,
2458187017,
41150267,
40613142,
40609810,
2776006,
4876265,
2776006,
3246293,
3255055,
3250242,
2899304,
2793965,
2825287,
49238396,
40419388,
40415304,
49232029,
49232226,
2817505
)
Quelqu'un peut-il m'aider? Merci
En fait, vous avez totalement raison! C'est à cause de ma stupidité que je "toujours" tout connecter aux mauvaises prises dans IB -_-. Merci ^^ –