问题
I have a View Controller which displays many nested UIViews. I want this project which displays many views to be embedded in another project as framework. So, how can I open View Controller of my framework from another project which has included this framework for third party use.
回答1:
You can use a method on your framework to return your viewController
something like this
- (UIViewController*)viewControllerForWidgetType:(WidgetType)widgetType;
and then in the app that uses your framework use something like this
UIViewController* testWidgetViewController = [[TestFrameworkController sharedInstance]viewControllerForWidgetType:TestWidgetType];
[self.navigationController pushViewController:testWidgetViewController animated:YES];
I hope this helps you
来源:https://stackoverflow.com/questions/38507208/how-to-open-up-view-controller-included-in-framework-as-static-library-for-ios