There seems to be two standard ways of writing methods in Objective C, and I can't quite grasp what the difference is and why one is used rather than the other. For example, from the UIWebViewDelegate:
- (void)webViewDidFinishLoad:(UIWebView *)webView {
}
- (void) webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
}
Why isn't the second one simply written as webViewDidFailLoadWithError, or why doesn't the first one match the second style?
Another example, this time from UITableViewDataSource:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 0;
}
How come numberOfSectionsInTableView doesn't follow the same format as the other methods?
I'm sorry if this is a very simple question - it's just been bugging me for a while now and I'd like to get it clear in my head!
Thanks in advance for your help.