嗨,我有一个基于xib的项目,然后我添加了一个故事板“main.storyboard”。但它仍然以最初的屏幕代替故事板运行相同的xib。设置故事板作为开始文件,而不是xib
2013-12-18 16:44:14.376 AePubReader[1882:60b] NSMainNibFile and UIMainStoryboardFile are both set. NSMainNibFile ignored.
2013-12-18 16:44:14.396 AePubReader[1882:60b] There is no app delegate set. An app delegate class must be specified to use a main storyboard file.
下面的图片是确保我已经给故事板作为开始屏幕。
我的旧应用程序委托厦门国际银行文件,现在我在这里代替XIB UIViewController类,并把我的新故事板视图 - 控制类名
.h文件中
#import <UIKit/UIKit.h>
@class viewViewController;
@interface AePubReaderAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
viewViewController *detailViewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet viewViewController *detailViewController;
@end
.m文件
#import "AePubReaderAppDelegate.h"
#import "ViewController.h"
@implementation AePubReaderAppDelegate
@synthesize window, detailViewController;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// // Override point for customization after app launch.
//
// self.window.rootViewController = self.detailViewController;
// [self.window makeKeyAndVisible];
//
// // [detailViewController loadEpub:@"ker"];
return YES;
}
这是工作.... – Bangalore