Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9279703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:41:54+00:00 2026-06-18T17:41:54+00:00

I created a new iPhone project on a Master-Detail-Application. As I need a login

  • 0

I created a new iPhone project on a Master-Detail-Application. As I need a login before, I added at the storyboard a new ViewController, checkmarked “is initial View Controller” and assigned the new created class LoginViewController to this ViewController.

Furthermore but not relevant (in my opinion), i created a segue and connected it from the ViewController to the NavigationController (of the Master-Detail-Template).

The AppDelegate.m was changed to launch the new controller at startup:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.

    /* // Old Master-Detail-View-Controller
    UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
    MasterViewController *controller = (MasterViewController *)navigationController.topViewController;
    controller.managedObjectContext = self.managedObjectContext;
     */

    (LoginViewController *)self.window.rootViewController;

    return YES;
}

This will end up in the error:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '-[UICollectionViewController loadView] loaded the "Qn5-Rj-iPA-view-IRE-eP
-ILZ" nib but didn't get a UICollectionView.'

I have as well tried this:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.

    LoginViewController *loginViewController = [[LoginViewController alloc] init];

    self.window.rootViewController = loginViewController;   //Set the view controller
    [self.window makeKeyAndVisible];

    return YES;
}

Resulting in a similar error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'UICollectionView must be initialized with a non-nil layout parameter'

Where is my mistake?

What I do not get is, where the hell the UICollectionView in the error message comes from. I did never create one or add one??

Storyboard

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:41:55+00:00Added an answer on June 18, 2026 at 5:41 pm

    My LoginViewController inherits by mistake form UICollectionViewController instead of UIViewController. I fixed that and it works.

    This explained the strange errormessage which i did not understood in the first place. As always the truth is in the sourcecode. Rechecking helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just created a new iPhone tabbed Application using xcode project template, without storyboard.
I have created a new iPhone project in Xcode 4 and added some files
I apologize I am new to iphone programming. I have created a Master-Detail Iphone
I am new to iphone development.I have created a UIview controller class and added
I am new to iPhone development and Three20 framework. I created a simple login
I am new to this iphone development.I have created a tab bar application which
I created a new target in an iOS project and added some of my
An [ApplicationName]-Info.plist file is created with every new iPhone SDK project. My question: is
I created a new Xcode project (iOS application, Tabbed Application). Now I'm seeing one
I am new to iphone development.I have created map applications and displayed the cuurent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.