UIView *myView = [[[UIView alloc] initWithFrame:CGRectMake( 0, 20, 320, 460 )] autorelease]; myView.backgroundColor = [UIColor redColor];
[self.window addSubview:myView];
Now create a button on the myView so that we can remove it and show our home screen when user press it.
You can create a button to remove the view by using the code
UIButton *startButton = [UIButton buttonWithType:UIButtonTypeCustom];
startButton.frame=CGRectMake(118, 409, 88, 37);
[startButton addTarget:self action:@selector(startApp) forControlEvents:UIControlEventTouchUpInside];
[myView addSubview:startButton];
Now we have to write down the method which we gave to our button to remove myView and allow user to navigate to home screen
-(void)startApp
{
[myView removeFromSuperview];
}
Summary:In the above post we learned, how to show a screen before a rootView in an application that based on TabBarController.
Hope it helps…