objective c - UITableView,unrecognized selector sent to instance -
i created tableview subview of 1 uiview(call uiviewa), , uiview subview of main viewcontroller. when tried implement function "didselectrowatindexpath" of tableview, program crashed information "unrecognized selector sent instance".
the delegate of tableview set "file's owner" uiviewa. tried add exception breakpoints showed exception points
return uiapplicationmain(argc, argv, nil, nsstringfromclass([appdelegate class]));
which in main.m
if want create custom table view, should subclass of uitableview. instead creating subclass of uiviewcontroller.
obviously uiviewcontroller has no method named didselectrowatindexpath (and suppose neither uiviewa has it). that's cause of crash.
Comments
Post a Comment