Reputation: 39
I am making a application for the iphone and i am using window based application and i am doing this:
#importing all UIViewController
class in the appDelegate
class.
creating the object for accessing the variables and function and I am controlling all
action,event and controls from the appDelegate
class.
I want to ask that is this right approach. I dont want to use view based application, I want to use UIViewController
class just only controllers display.
If this is not a good approach for making the application tell me the good process for doing this.
Upvotes: 0
Views: 322
Reputation: 130
You could just create a singleton that holds the data and methods you want to share and access it from any view controller you want. Conceptually, it's not much different then what you are doing with the appDelegate class but it is better so that you don't clutter up the app delegate.
Upvotes: 0
Reputation: 7256
I suggest you take a look at this:
http://www.icodeblog.com/2011/10/11/back-to-basics-an-introduction-to-view-controllers/
You should also read up on the iPhone-programming-basics, you will find a lot of nice tutorials and articles with a quick Google-search for "iPhone programming".
Upvotes: 1