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

  • Home
  • SEARCH
  • 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 6711667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:10:05+00:00 2026-05-26T08:10:05+00:00

I have a method that loads a nib file containing a view: [[NSBundle mainBundle]

  • 0

I have a method that loads a nib file containing a view:

[[NSBundle mainBundle] loadNibNamed:@"NewView" owner:self options:nil]; 

and I was wondering if it’s possible to add a simple transition when the view loads. I have scoured the internet and I haven’t been able to find anything.

  • 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-26T08:10:06+00:00Added an answer on May 26, 2026 at 8:10 am

    There are many ways to present views and animate them.

    You can create create using loadNibnamed:

    How to load a UIView using a nib file created with Interface Builder

    One way to animate a view in is to present it modally. This will animate from the bottom:

    [[self navigationController] presentModalViewController:navController animated:YES];
    

    These posts show getting more control how it animates in using modalTransitionStyle

    How can I change the animation style of a modal UIViewController?

    iPhone – presentModalViewController with transition from right

    Another option is to create a view, add it as a subView to your current view and animate the frame. If you’re just loading a view, consider using UINib – it was added in iOS 4.0 and caches. It double perf.

    UINib *nib = [UINib nibWithNibName:@"TestView" bundle:nil];
    UIView *myView = [[nib instantiateWithOwner:self options:nil] objectAtIndex:0]];
    

    Then, you can add it as a subView.

    If you want to animate subViews within your view, see this tutorial:

    http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial

    Specifically:

    CGRect basketTopFrame = basketTop.frame;
    basketTopFrame.origin.y = -basketTopFrame.size.height;
    
    CGRect basketBottomFrame = basketBottom.frame;
    basketBottomFrame.origin.y = self.view.bounds.size.height;
    
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationDelay:1.0];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
    
    basketTop.frame = basketTopFrame;
    basketBottom.frame = basketBottomFrame;
    
    [UIView commitAnimations];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a method that loads a Crystal Reports file, sets the appropriate login
I have a method that creates a MessageDigest (a hash) from a file, and
I have the following method that loads in a blank template image, draws the
I have a UIView subclass that I'd like to instantiate from a NIB file.
I have 3 separate view controllers with their own NIB file. I have a
I have code that dynamically load 10 different textfields in viewdidload method now if
I have a few methods inside my view controller that load up for future
I have class method that returns a list of employees that I can iterate
I have a method that where I want to redirect the user back to
I have a method that can return either a single object or a collection

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.