合并2个xcode项目
我有 2 个 xcode 项目,我想将它们合并为 1 个。但我坚持使用代表,因为这两个项目都有自己的代表。 第一个项目有一个分割视图(主/详细)视图,第二个项目是轮播。
我想用轮播项目替换详细视图。我已经链接了框架以及相关文件和笔尖。
但我卡在了 MasterDetail 的 appdelegate 上,如何调用 carousel 项目的 appdelegate 和 ViewController 并将所选项目传递给 carousel?
#import "iPadAppDelegate.h"
#import "MasterViewController.h"
#import "DetailViewController.h"
//iCarousel
#import "CarouselExampleAppDelegate.h"
#import "CarouselExampleViewController.h"
//
@implementation iPadAppDelegate
@synthesize window, splitViewController, masterViewController, detailViewController;
//iCarousel
@synthesize carouselExampleViewController;
//
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after app launch
masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
/*
detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
masterViewController.detailViewController = detailViewController;
*/
**//iCarousel
??? Call the Carousel delegate? And also the Carousel Controller?
//**
splitViewController = [[UISplitViewController alloc] init];
splitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, detailViewController, nil];
splitViewController.delegate = detailViewController;
// Add the split view controller's view to the window and display.
[window addSubview:splitViewController.view];
[window makeKeyAndVisible];
return YES;
}
谢谢,
凯文
I have 2 xcode projects and i want to merge them into 1. But i stucked at the Delegates as both project has their own delegates.
First project has a Splitview (Master/Detail) view and the second project is a carousel.
I want to replace the detail view with the carousel project. I already linked the framework and the related files and nibs.
But im stucked at the appdelegate of the MasterDetail, how do i call the appdelegate and the ViewController of the carousel project and pass the selected item to the carousel?
#import "iPadAppDelegate.h"
#import "MasterViewController.h"
#import "DetailViewController.h"
//iCarousel
#import "CarouselExampleAppDelegate.h"
#import "CarouselExampleViewController.h"
//
@implementation iPadAppDelegate
@synthesize window, splitViewController, masterViewController, detailViewController;
//iCarousel
@synthesize carouselExampleViewController;
//
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after app launch
masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
/*
detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
masterViewController.detailViewController = detailViewController;
*/
**//iCarousel
??? Call the Carousel delegate? And also the Carousel Controller?
//**
splitViewController = [[UISplitViewController alloc] init];
splitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, detailViewController, nil];
splitViewController.delegate = detailViewController;
// Add the split view controller's view to the window and display.
[window addSubview:splitViewController.view];
[window makeKeyAndVisible];
return YES;
}
Thanks,
Kevin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论