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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:05:52+00:00 2026-05-29T07:05:52+00:00

I am including a file like this: #import BannerPhoneContentController.h however, when I try to

  • 0

I am including a file like this:

#import "BannerPhoneContentController.h"

however, when I try to use it like this:

bannerContentController = [[BannerPhoneContentController alloc] init];

I get the error:

Use of undeclared identifier 'BannerPhoneContentController';

what could be causing the code to seemingly ignore my import?

this is the header for banner content controller.

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

#import "BannerContentController.h"

@interface BannerPhoneContentController : BannerContentController <UIScrollViewDelegate>
{   
    UIScrollView *scrollView;
    UIPageControl *pageControl;
    NSMutableArray *viewControllers;

    // To be used when scrolls originate from the UIPageControl
    BOOL pageControlUsed;
}

@property (nonatomic, retain) UIScrollView *scrollView;
@property (nonatomic, retain) UIPageControl *pageControl;

@property (nonatomic, retain) NSMutableArray *viewControllers;

- (IBAction)changePage:(id)sender;

@end

EDIT bannerContentController is of type BannerContentController NOT BannerPhoneContentController. The latter is a subtype of the former. It is definitely worth noting that this exact code works just fine in another app, so it’s nothing to do with the code itself – just how it’s being included apparently. I’m stumped.

EDIT ok found the problem – not sure how to fix it. I generated the preprocessed file and the header file it’s included is in fact this:

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

#import "ContentController.h"

@interface PhoneContentController : ContentController <UIScrollViewDelegate>
{   
    UIScrollView *scrollView;
    UIPageControl *pageControl;
    NSMutableArray *viewControllers;

    // To be used when scrolls originate from the UIPageControl
    BOOL pageControlUsed;
}

@property (nonatomic, retain) UIScrollView *scrollView;
@property (nonatomic, retain) UIPageControl *pageControl;

@property (nonatomic, retain) NSMutableArray *viewControllers;

- (IBAction)changePage:(id)sender;

@end

note the difference – all the ‘Banner’s are missing. This is what the file used to look like. However, I’ve checked and the file that’s in the project is the one I posted at the top. I tried cleaning the solution and building again. How can I fix this and why has it happened?

EDIT The file that I’m including all this in is part of a code library. I have now created a new project, imported the code library and included all of this in that library once again in exactly the same way. and it works. I have looked over the two projects and the code in question is identical. This must be a project setting?

  • 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-29T07:05:53+00:00Added an answer on May 29, 2026 at 7:05 am

    It looks for me like recursive import. Say, BannerContentController.h imports BannerPhoneContentController.h, and BannerPhoneContentController.h imports BannerContentController.h.

    If it is the case, then you should resolve recursive dependencies. E.g. using forward declaration.

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

Sidebar

Related Questions

I have a header file including a structure like this: typedef struct { int
I would like to know if a file is open by any process (including
I'm including a file init.php which defines path constants. So if I include init.php
I have a header file like this: /* * APP 180-2 ALG-254/258/772 implementation *
Instead of messing up my HTML file, I'd like to import my external JavaScript
I have a dictionary file formatted like this: A B [C] D Where a
Let's say I'm including a file which contains html. The html have characters as
Has anyone created HTML microformats for video and video overlays including: Video File Links
When including a header file in C++, what's the difference between... including the .h
I want to update an ASP .NET web application (including web.config file changes and

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.