简体   繁体   中英

Implementing an iPhone App within an App

I have two apps, I want to merge them, by bringing the smaller app in to the main application, such that instead of the smaller app originally being instantiated from it's App Delegate, is instead pushed via the existing navigation controller of the main controller.

But the original developer has got various dependencies on the structure of the app and the original app delegate singleton, making it non trivial to push it's main View controller without re arranging code.. which takes time.

How do people normally take a standard cocoa project and turn it into a feature of some other existing application, while retaining the ability to keep things nicely decoupled?

XCode Project 1 - Does X features
XCode Project 2 - Does YZ features, but also want it to do the X features. Such that it does XYZ features :)

If an application is not designed and constructed to facilitate this then you will probably be doing some rewriting.

The real answer is to plan for this ahead of time using principles like encapsulation, and loose coupling, and employing an architectural pattern like Model–view–controller.

I ran across this website with a ton of links to articles covering OO Design Principles .

您可以将项目A转换为静态库,并在项目B中使用它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM