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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:02:41+00:00 2026-06-11T14:02:41+00:00

Working on iphone splash screen, I have made custom animation with the help of

  • 0

Working on iphone splash screen, I have made custom animation with the help of some images that will be on my splash screen on landscape mode and then i want when my second view loads it should show up in portrait mode, but i am unable to implementing this, here goes my code:

@interface SplashViewController : UIViewController
 {
 IBOutlet   UIImageView *ani;
  NSMutableArray *arr;
}
@property(strong,nonatomic)UIImageView *ani; 
@property(strong,nonatomic)NSMutableArray *arr;
-(void)switchView;
@end

#import "SecondView.h"
@implementation SplashViewController
@synthesize ani,arr;  


 - (void)viewDidLoad
{

arr = [NSMutableArray arrayWithObjects:[UIImage imageNamed:@"image_1.png"],
       [UIImage imageNamed:@"image_2.png"],[UIImage imageNamed:@"image_3.png"], 
       [UIImage imageNamed:@"image_4.png"],[UIImage imageNamed:@"image_5.png"],
       [UIImage imageNamed:@"image_6.png"],[UIImage imageNamed:@"image_7.png"],
       [UIImage imageNamed:@"image_8.png"],[UIImage imageNamed:@"image_9.png"],
       [UIImage imageNamed:@"image_10.png"],[UIImage imageNamed:@"image_11.png"],
       [UIImage imageNamed:@"image_12.png"],[UIImage imageNamed:@"image_13.png"],
       [UIImage imageNamed:@"image_14.png"],[UIImage imageNamed:@"image_15.png"],
       [UIImage imageNamed:@"image_16.png"],[UIImage imageNamed:@"image_17.png"],
       [UIImage imageNamed:@"image_18.png"],[UIImage imageNamed:@"image_19.png"],       
         [UIImage imageNamed:@"image_20.png"],nil];


   [ani setImage:[UIImage imageNamed:@"image_20.png"]];

ani.animationImages=arr;

ani.animationDuration=10;
 //   ani.animationRepeatCount=1.0;
[ani startAnimating];
[self performSelector:@selector(switchView) withObject:nil afterDelay:15.0];


          [super viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.
}


-(void)switchView
{
 [ani stopAnimating];
 SecondView *sec=[[SecondView alloc]init];
[self.view addSubview:sec.view];

}

 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

I took one button in second view to remove the splash view from it, so as when we click the button on second view the splash view should go off, or same can be done on did load of second view but i am unable to achieve it

 -(IBAction)btn:(id)sender
{
 // UIViewController 
[self.view removeFromSuperview];
 }

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Note: I do not want to use the Default.png image for my flash i want this custom animation for my splash to be on landscape mode and following view’s are in portrait, when i try to run this the second view comes up on the splash view but the splash view still appears on back of view .. i have only simulator to test .. can any one help me out on this??

  • 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-11T14:02:43+00:00Added an answer on June 11, 2026 at 2:02 pm

    You shouldn’t implement the switching of views within your spalshScreenController: that’s is not its responsibility it is better to do it in your appdelegate applicationDidFinishLaunching method:

    -(void)applicationDidFinishLaunching:(UIApplication *)application {
         splashViewController = [[SplashViewController alloc] initWithNibName:@"SplashView" bundle:nil];
         [window addSubview:splashViewController.view];
         [window makeKeyAndVisible];
    
      }
    

    and add a method that’s respond to your button pressed what will present the view of your second controller.

    -(void)onSlashScreenDone{
    
         [splashViewController.view removeFromSuperview];
         [window addSubview:[youOtherController view]];
         [window makeKeyAndVisible];
    
    }
    

    allow the orientation you want to allow in the secondcontroller by implementing the shouldAutorotateToInterfaceOrientation method.

    Take a look to this tut: this is well explained about how to make a splashscreen on ios.

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

Sidebar

Related Questions

I have an otherwise working iPhone program. A recent change means that it generates
Greetings! I have a working iPhone app (huzzah!) that uses a MainView.xib containing a
I am working with iPhone app(LandscapeRight Mode), I have added a Image view named
I am working on iphone application. I want to make an app that will
I have a nice working iphone app that works with core data. I use
I have been working with iPhone application in which i am using sqlite database.
Can anybody help me to solve this problem. I am working on iphone development.
I'm working on an iPhone app that requires a basic client/server interaction model. For
I'm working on an iPhone application. I'm using Storyboard. I wanted to have one
I am working on an iPhone app with Apple Push Notification integration. I have

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.