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 7181285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:31:33+00:00 2026-05-28T17:31:33+00:00

I have copied some files across from one project to another. The code simply

  • 0

I have copied some files across from one project to another. The code simply displays a view you can scroll horizontally between items, and then scroll down each item.

The code was in a project with a MainWindow.xib and the relevant name in the plist file.

I’m putting the code into an empty OpenGL ES project which has no nib information in the plist file, and two nib files called “ProjectNameViewController_iPhone.xib” and “ProjectNameViewController_iPad.xib”

When I run the program, none of my code displays. I have a feeling the problem lies with where I am adding subviews to the view controller, and calling this line:

- (id)initWithPageNumber:(int)page
{
    if (self = [super initWithNibName:@"MyView" bundle:nil])
    {
        pageNumber = page;
        [self.view addSubview:newsItem];
    }
    return self;
}

First of all, It’s odd to me that the string here is “MyView” and not “MainWindow” as there is nothing in my project called “MyView” (I’ve searched the project directory and the code is being called)

but getting back to the point, the new code in the open GL ES project is this:

- (id)initWithPageNumber:(int)page
{
    if (self = [super initWithNibName:@"IntegrationTestViewController_iPhone" bundle:nil])
    {
        pageNumber = page;
        [self.view addSubview:newsItem];
    }
    return self;
}

I will put in a check later for Ipad users etc.. If the string is anything else, the code breaks when other parts try to access the classes view which doesn’t exist, but with this nothing displays.

what am I not understanding? (I’m quite new to ios / objective-c)

  • 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-05-28T17:31:34+00:00Added an answer on May 28, 2026 at 5:31 pm

    Check the outlets mad to ProjectNameViewController_iPhone.xib and File’s owner class.

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

Sidebar

Related Questions

I have copied some files from project A to project B, both of which
I am trying to copy some files across from my app bundle to the
git version 1.7.4.1 I am using git on Ubuntu. I have copied some files
I have a product setup executable that copies some files to the user's hard
I am processing some CSV file which i have copied in Bin folder of
I have some 3rd party libraries and includes (I have copied them to the
I have copied zipped file from the playframework.org website and unzipped it at a
I have some content files that I would like to share between a number
I am teaching myself some Python and I have come across a problem which
I have an application that is looking through some files for old data. In

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.