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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:53:19+00:00 2026-06-04T08:53:19+00:00

I have a iOS 5 project nearly completed, but there’s one View missing everywhere

  • 0

I have a iOS 5 project nearly completed, but there’s one View missing everywhere which is the same. It’s an alternative to the standard NavigationBar, you can go “back” in the navigation hierarchy with a swipe and it’s animating nicely.

Ok, because it’s hard to do the layout by code I created the empty IB document (HeaderView.xib) where I have a view containing subview and etc.
I had the animation code before so I just created a UIView subclass (“HRAnimationView”) (and wrote the name of it in the xib’s inspectors “Custom Class” field, also hooked up the subviews to outlets) with a method:

- (void)loadAnimation {…}

and a second one (this is the delegate-method for finished animations):

- (void)animationDidStop:(NSString*)animationID finished:(NSNumber*)finished context:(void*)context {}

…this is where all the animation stuff happens and calling itself over and over till it’s finished…

In the storyboard I have a subview with exact the same dimensions (and the outlet for it) and wanted to load the XIB (in the viewDidLoad-method of the corresponding controller) with:

NSArray *bundle = [[NSBundle mainBundle] loadNibNamed:@"HeaderView" owner:self options:nil];

HRAnimationView *view;

for (id object in bundle) {        
    NSLog(@"%@",object);
    if ([object isKindOfClass:[UIView class]])
        view = (HRAnimationView *)object;
}

self.headerView = view;
[self.view setNeedsDisplay];
[view loadAnimation];

BUT the headerView is EMTPY!! (also UIView *view didn’t worked, nor owner:self.headerView)

…the Log just gives me:

<HRAnimationView: 0x3f1890; frame = (0 0; 240 49); autoresize = RM+BM; layer = <CALayer: 0x3f18d0>>

…

WHAT IS the problem?? There’s also no compilation failure!

I don’t get it, why is the xib TOTALLY worthless in my case?!

  • 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-04T08:53:20+00:00Added an answer on June 4, 2026 at 8:53 am

    SOLVED!!!

    I created a new ViewController and checked the “create with xib” box and deleted the view of the xib and copy&pasted the already set up view in there and in the ViewController I put the animation code in viewDidLoad.

    Then loaded the hole thing in the viewDidLoad-method of each storyboard ViewController with:

    UIViewController *ctrl = [[UIViewController alloc] initwithNibNamed:@"HeaderView"];
    [self.headerView addSubview:ctrl.view]
    

    (headerView is a IBOutlet to a view in every Storyboard so, that’s basically the only thing to setup, NICE!)

    1. another possibility would be:
      Add subview using storyboard without external xib
    2. or: http://forums.macrumors.com/showthread.php?t=749544

    Looks like a Xib is useless without a corresponding ViewController, but should (strange.. whatever).
    But thanks for your responses, hope someone now can find this if he/she has the same problem!

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

Sidebar

Related Questions

Now I have a Xcode project which is built for iOS 5, but now
Overview I have a iOS project in which the view controller implementation which has
Overview I have an iOS project which contains 2 navigation controllers as shown in
I have an iOS project that sends a Person class with one attribute name
In one of my iOS project I have add a sub-module added, lets say
I have an iOS project which builds and executes as expected under debug yet
I have a iOS project in which I am using ARC in my own
A have a iOS-project that I send to my iPad. But when I'm trying
There are some files in my iOS project that have some warnings, and I
Overview I have an iOS project in which I store a list of names

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.