+2  A: 

Hi Sagar, I provided the answer to the question you mentioned - it definitely is in the Apple documentation (although as you say, not in the sample file). Remember the method name is

tableview:didSelectRowAtIndexPath

if you miss off the "tableview:" bit at the beginning and just search for

didSelectRowAtIndexPath

you won't find it in the documentation so easily.

If you look in the documentation that comes with XCode, you will see, for example, all methods that you can implement for the UITableview Delegate, including the one I posted to your previous answer. Just type "UITableview" into XCode help, and then select "UITableview delegate". It will then display all the methods available for you to call, and you can even just copy and paste them straight into your code.

I don't know if anyone's already done this and made the "template" classes you ask about available, but it should be very easy for you to do this yourself if you want.

Hope that helps

h4xxr
Click the Help menu, then "Documentation."
Rob Napier
You are right Sir. I had never gone through the way which you told to me. That's what I actually needed.
sugar
+1  A: 

Sure; implementors of classes are free to implement any number of methods as a part of a class's internal implementation.

But that doesn't mean that you should use them.

You can use the Objective-C runtime's API for figuring out all the methods and classes, including those that aren't publicly declared.

But don't bother.

Specifically, if a method is not declared in the provided header files and is not documented in the documentation, don't use it. Using such a method will lead to fragility and maintenance headaches; your app may likely break at the next software update.

On the iPhone, your are expressly directed not to use private interfaces and your app will run the risk of rejection if you do so.

But I don't think that is what you are really asking. You mention:

Say for example. UITableView methods includes

didSelectRowAtIndexPath cellForRowAtIndex Path numberOfSectionsInTableView titleForHeaderInSection

However, UITableView does not declare any of those methods. Instead, it declares:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

Or, succinctly, tableView:didSelectRowAtIndexPath:, etc...

bbum
I had given just the sample that How I required the methods information.
sugar
+1  A: 

The methods you describe are in the documentation. They're in UITableViewDelegate and UITableViewDataSource, which are described at the top of the UITableView documentation. You can easily copy and paste the method definitions you need from the documentation. You can also find the protocol definition in the headers easily by using "File>Open Quickly..." and typing in the name of the protocol ("UITableViewDelegate" for instance). They are often written in the headers to make it easy to copy and paste what you need most often.

This is sometimes a small hassle in Cocoa, because Xcode doesn't auto-complete method signatures. It would save a little trouble if it did. But the solution is not to implement every delegate method that exists (as @bbum pointed out earlier). In the vast majority of cases, only a small fraction of the possible delegate methods are ever implemented. So automatically populating them all would cause much more work than it saved.

Rob Napier
You are also right sir.
sugar