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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:59:39+00:00 2026-06-19T02:59:39+00:00

I am interested to write my custom view, so I created the following xib

  • 0

I am interested to write my custom view, so I created the following xib file:

enter image description here

This is the definition file:

- (void)_baseInit {
    NSLog(@"Unseen View loaded");
    [self addSubview:[self activityIndicator]];
    [self activityIndicator].alpha = 1.0;
    [self activityIndicator].frame = CGRectMake(round(([self imageView].frame.size.width - 25) / 2),
                                                round(([self imageView].frame.size.height - 25) / 2), 25, 25);
    [self activityIndicator].hidesWhenStopped = YES;
    [self showIndicator];

    UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(move:)];
    [self imageView].userInteractionEnabled = YES;
    [panRecognizer setMinimumNumberOfTouches:1];
    [panRecognizer setMaximumNumberOfTouches:1];
    [panRecognizer setDelegate:self];
    [[self imageView] addGestureRecognizer:panRecognizer];

}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self _baseInit];
    }
    return self;
}

- (id)initWithCoder:(NSCoder*)coder
{
    if ((self = [super initWithCoder:coder])) {
        [self _baseInit];
    }
    return self;
}

I tried to hook it up in my story board:

x

And I have my MainViewController call this during viewDidLoad:

- (void)viewDidLoad {
    [super viewDidLoad];

    self.unseenView = [[[NSBundle mainBundle] loadNibNamed:@"UnseenView" owner:self options:nil] objectAtIndex:0];
    self.unseenView.delegate = self;

Unfortunately, nothing is showing up in my simulator literally nothing, not even the text labels.
enter image description here

However I am seeing the following log messages:

2013-02-20 17:37:58.929 Giordano.iPhone[66857:c07] Unseen View loaded
2013-02-20 17:37:58.934 Giordano.iPhone[66857:c07] Unseen View loaded

What am I doing wrong?

  • 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-19T02:59:40+00:00Added an answer on June 19, 2026 at 2:59 am

    It looks like you are preparing your view correctly, but you are not adding it to the view hierarchy. in the viewDidLoad code you need to add this line:

    [self.view addSubview:unseenView];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been following this Apple Doc to add a custom UITableViewCell that I layed
public void visitToken(DetailAST aAST) {} I am trying to write a custom checkstyle rule.
I'm interested to write custom syntax definitions, and I'd a base to start from.
I am interested in writing utf-8 encoded strings to a file. I did this
I'm trying to write a custom NAnt task that does some file-based operations. One
I am interested in the following scenario specifically. Suppose you have team that writes
I interested to work with data types and file formats. For example I want
I am interested in doing this C code in Java: // sets n's ith
I am interested in theoretical Big-O analysis of the following MySQL query: SELECT id,
I know you can write support for custom PSDrives. But those are always a

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.