views:

81

answers:

1

Thinking about divide and conquer, I decided to start an application having small pieces of my big app. I thought it was more convenient and easier specially as far as errors go. When I tried to merge two of them, I faced the problem of having separate delegates, and mainwindow. Maybe merging the method of the delegate applicationDidFinishLaunching and knowing how to convert one of the mainwindows to a viewcontroller is not working. How do I take two projects and combine them into one? On one I have a TabBar controller app, and one of the tabs is the scrollview with page control app I want to merge with. Therefore, two delegates, two mainwindow.

A: 

Figure out which one of the apps has the most code that can be used in the final app, and merge the other one into it. This is a good time to check and see how purely object oriented your app is, so that the sharing of objects could be as simple as just adding the class file and header into your main app. As for app delegates, just pick one. You shouldn't need two. In my app delegates there are maybe 3-5 lines that are different than what the template contains, so it's not hard to change it or modify it slightly.

Again, think about code reuse, and use this opportunity to make your classes follow the MVC and be as independent of each other as possible. You'll thank yourself later when you are working on your next app and can use code you have previously written without having to go through all this work.

mahboudz