views:

27

answers:

3

I have a tab bar application and I want to display those views that most part of apps have, with the name of the company or the name of the app.

I've created the follow viewController

Introduction *introducao = [[Introduction alloc] initWithNibName:@"Introduction" bundle:nil];

I don't know where exactly should I insert the code to show the modal because I have a tab bar application:

[self.navigationController presentModalViewController:galeria animated:YES]; 

I've tried to insert these lines on appDelegate.. but didn't work.. somebody have an idea?

A: 

if you are trying to show a splash screen right when the application opens, you should use a Default.png image instead of a view controller showing an image. Check out the Apple Documentation on Human Interface Guidelines and Beginning iPhone Development.

Jesse Naugher
Thanks for your answer, I've tried this solution, but I don't know if there is a way to controll the duration of the image on screen.. And I guess that this solution is not useful when I need to show more than one image, like the company image and then the app title image..but thanks anyway..
Roberto Ferraz de Novaes
A: 

First of all, you'll need to ensure that you have a navigation controller present to present the model view from. Otherwise in the above code you'll be messaging nil and nothing will happen. Then you'll want to put the presentModalViewController:animated: call in your app delegate's applicationDidFinishLaunching: implementation.

bosmacs
A: 

Thanks for all answers.. they were very useful to understand better the process..

I have found a solution that does exactly what I need! So if someone need to create those splash screens with a sequence of images it is very useful:

Just create a ImageView on the Delegates Header and do the following:

splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
splashView.image = [UIImage imageNamed:@"Default.png"];
[window addSubview:splashView];
[window bringSubviewToFront:splashView];

to control the duration of the splash screen:

[self performSelector:@selector(removeSplash) withObject:nil afterDelay:1.5];

To remove the splash:

-(void)removeSplash;
{
  [splashView removeFromSuperview];
  [splashView release];
}

so If you want to create a sequence of image just create a method to change the splashView.image.. and create a NSTIMER to call it..

Roberto Ferraz de Novaes