Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c SIGABRT错误-无法加载捆绑中的NIB_Objective C_Sigabrt_Nsbundle - Fatal编程技术网

Objective c SIGABRT错误-无法加载捆绑中的NIB

Objective c SIGABRT错误-无法加载捆绑中的NIB,objective-c,sigabrt,nsbundle,Objective C,Sigabrt,Nsbundle,我有一个SIGABRT错误: 由于未捕获异常“NSInternalInconsistencyException”而终止应用程序,原因:“无法在名为“SliderGaloreController”的捆绑包中加载NIB:“NSBundle(loaded)”中 我已经研究了另一个与我的问题非常相似的问题,但我仍然无法解决它 以下是我的AppDelegate的内容。h: #import <UIKit/UIKit.h> @class SliderGaloreController; @int

我有一个SIGABRT错误:

由于未捕获异常“NSInternalInconsistencyException”而终止应用程序,原因:“无法在名为“SliderGaloreController”的捆绑包中加载NIB:“NSBundle(loaded)”中

我已经研究了另一个与我的问题非常相似的问题,但我仍然无法解决它

以下是我的AppDelegate的内容。h:

#import <UIKit/UIKit.h>

@class SliderGaloreController;

@interface SliderGaloreAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) SliderGaloreController *sliderGaloreController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions {
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

if ([prefs objectForKey:@"PuzzlePicture"] == nil) {
    [prefs setBool:FALSE forKey:@"Refresh"];
    [prefs setInteger:0 forKey:@"PuzzlePicture"];
    [prefs setBool:TRUE forKey:@"CountMoves"];
    [prefs setBool:TRUE forKey:@"Timer"];
    [prefs setInteger:1 forKey:@"PuzzleLayoutX"];
    [prefs setInteger:1 forKey:@"PuzzleLayoutY"];
}

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.sliderGaloreController = [[SliderGaloreController alloc]           
initWithNibName:@"SliderGaloreController" bundle:nil];
self.window.rootViewController = self.sliderGaloreController;
[self.window makeKeyAndVisible];

return YES;
有人能指出我做错了什么吗?此错误不允许我运行我的应用程序。。。提前谢谢


更新1:修复代码

Xcode不喜欢重命名或移动文件。它似乎找不到名为“SliderGaloreController.xib”的nib文件。确认您的项目中确实有一个名为“SliderGaloreController.xib”的文件。对拼写错误进行三次检查

此外,如果最近更改了nib(.xib文件)名称,则可能必须从项目中删除该文件,然后重新添加

以下是有关您的错误的更多信息,可能会有所帮助: