tags:

views:

107

answers:

2

What's the main point behind putting variables and method signatures inside ApplicationDelegate.h in Objective-C ? By doing this, all those methods and variables are seen by another view controller classes? Is that the point?

And also: is there only one application delegate class inside each project?

+2  A: 

The Application Delegate (and yes, there is only one per application) is the backbone of the Controller layer in Cocoa and Cocoa Touch applications. Its main function is to customize the behaviour of NS/UIApplication in certain circumstances (such as application termination, application opening, etc.). It is also commonly used to assign delegates to other responders (such as table views, outline views, etc.).

In small applications, it will usually act as both delegate and dataSource to most interface elements, but as Felixyz points out, this can deteriorate quickly if the application grows.

Williham Totland
identifying variables and methods inside application delegate class ?????
@ahmet732: what kind of comment is that?
Felixyz
@Felixyz he missed a '?', it's easier to understand when you imagine there are six.
Tim Snowhite
sorry for that :) ı wanted to ask "what about identifying some variables and methods inside app delegate?" Felixyz very thanks for your answer .. It was very undestandable..
+2  A: 
Felixyz