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

grangej

macrumors newbie
Original poster
Feb 20, 2011
4
0
Ok I am trying to wrap my head around this universal app setup. I need to have some code load for both iphone/ipad outside of the AppDelegate, how would I load this without duplicating the code in both the iphone and ipad versions?

I have a TabBarController and need to load some code before this is loaded completely.
 
You could have each side's app delegate call the same, single piece of code (a concept known as code reuse).

I think perhaps I might be over thinking this whole MVC thing.

I was thinking of more duplicating the shared AppDelegate structure apple is using in there template (an app delegate that inherits from a shared app delegate and overrides what is necessary, basically doing something similar with the rootViewController but my disconnect is happening with the tabbarcontroller, It seems to want to be connected to the appDelegate not a separate controller like I would like, am I missing something?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.