I am learning to code in this language so please bare with me and my niave question.
I had lots of problems with using storyboard getting stuck with code signing errors (you may have seen my questions in the forum) so I decided that as I was not doing anything complex I would simplify the code so removed the reference to the storyboard and its entry in the plist.
I am now trying to get the flow of the app to work without storyboard or xib.
The build goes fine but the run stops with the debug error summary containing the error about NIB not in bundle.
Ive tried googling but ended up getting lost in all the instances of this error where storyboard and or XIB was involved.
I dont have an xib or storyboard.
Anyone give me a pointer as to where I am going wrong?
Reference information below here. If more is needed please let me know.
The app in the navigator looks like this:
mouse4cat
mstAppDelegate.h
mstAppDelegate.m (code in reference below)
mstViewController.h
mstViewController.m ( functionality in here is mainly to establish and move a mouse image arround in the view)
Images.xcassets (contains the icons and default images)
Supporting Files (contains the images for the mouse animations)
AppDelegate contains:
//
// mstAppDelegate.m
// mouse4cat
//
// Created by major on 13/10/2017.
// Copyright (c) 2017 major. All rights reserved.
//
#import "mstAppDelegate.h"
#import "MSTViewController.h"
@implementation mstAppDelegate
@synthesize mstViewController = _mstViewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
UIViewController *mstViewController = [[UIViewController alloc] initWithNibName:@"mstViewController" bundle:[NSBundle mainBundle]];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:mstViewController];
self.window.rootViewController = nav;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end