Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikezang

macrumors 6502a
Original poster
May 22, 2010
939
41
Tokyo, Japan
I have a TableViewController and two subclasses of it, iPhoneTableViewController and iPadTableViewController.

My question is can I call didSelectRowAtIndex in TableViewController from both subclass?
 
You can call the superclass implementation of a method from any instance of a subclass yes.
Yeah, like you said, I just call a method in super from DidSelectRowAtIndex from both sub class.

When I asked this question, I thought there must have a didSelectRowAtIndex in super so that I have to call it, now I see, it is ok if I handle didSelectRowAtIndex in subclass.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.