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

North Bronson

macrumors 6502
Oct 31, 2007
395
1
San José
Maybe in your ViewController class, try something like:

myViewControllerDataModel = [(CustomAppDelegate *)[[UIApplication sharedApplication] delegate] myAppDelegateDataModel];

You are telling the main application to return its delegate, which is an instance of CustomAppDelegate. CustomAppDelegate has a method called myAppDelegateDataModel that returns a DataModel. Make sure you tell your app that your delegate will be a CustomAppDelegate (and it will have the myAppDelegateDataModel method), or you might have a warning that says it will not respond to myAppDelegateDataModel.

All in all though, I'm also not too sure that using your appDelegate to store data models is the best way to go. I would leave it in my CustomViewController.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.