0

我在这里相当新,但我遇到了 Apple Mach-O 链接器错误:错误

这是我的应用程序委托!// // AppDelegate.m // VCContainmentTut // // 由 A Khan 于 2013 年 1 月 5 日创建。// 版权所有 (c) 2013 AK。版权所有。//

#import "AppDelegate.h"
#import "RootController.h"
#import "ViewController.h"
#import "VidViewController.h"
#import "SelectVideo1.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    VidViewController *vidViewController = [[VidViewController alloc] init];
    UINavigationController *navController1 = [[UINavigationController alloc] initWithRootViewController:vidViewController];
[self.window setRootViewController:navController1];

    SelectVideo1 *selectVideo1 = [[SelectVideo1 alloc] initWith:@"Movie Trailers"];
    //[self.navController pushViewController:selectVideo1 animated:YES];


    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    UIStoryboard *tabStoryBoard = [UIStoryboard storyboardWithName:@"TabStoryboard" bundle:nil];
    UIStoryboard *navStoryBoard = [UIStoryboard storyboardWithName:@"NavStoryboard" bundle:nil];
    UINavigationController *navController = [navStoryBoard instantiateViewControllerWithIdentifier:@"Nav Controller"];
    UITabBarController *tabController = [tabStoryBoard instantiateViewControllerWithIdentifier:@"Tab Controller"];
    ViewController *redVC, *greenVC;
    redVC = [[ViewController alloc] init];
    greenVC = [[ViewController alloc] init];

    redVC.view.backgroundColor = [UIColor redColor];
    greenVC.view.backgroundColor = [UIColor greenColor];

    RootController *menuController = [[RootController alloc]
                                      initWithViewControllers:@[tabController, redVC, greenVC, navController, selectVideo1]
                                      andMenuTitles:@[@"Cheats", @"Videos", @"WalkThroughs", @"Nav"]];
    self.window.rootViewController = menuController;
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}



@end
4

1 回答 1

0

您的错误是由于您尝试使用未告诉项目(因此链接器)存在的代码而引起的。您需要将依赖项添加到项目中。在这种情况下,定义您尝试使用的功能的框架。

于 2013-10-19T23:01:19.760 回答