Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-02-2010, 12:23 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 53
sajjad111 is on a distinguished road
Default Change Main View

When we create a view based application,program has a view that it's main view
how can i change this view i mean that set another view for main view ?
sajjad111 is offline   Reply With Quote
Old 07-03-2010, 12:31 AM   #2 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 53
sajjad111 is on a distinguished road
Default

help
sajjad111 is offline   Reply With Quote
Old 07-03-2010, 12:35 AM   #3 (permalink)
Registered Member
 
Goldoneh's Avatar
 
Join Date: Nov 2009
Location: ایران
Posts: 45
Goldoneh is on a distinguished road
Default What's your means?

I don't understand what's your means! can you say more detail about your problem?
Goldoneh is offline   Reply With Quote
Old 07-03-2010, 01:12 AM   #4 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 53
sajjad111 is on a distinguished road
Default

Quote:
Originally Posted by Goldoneh View Post
I don't understand what's your means! can you say more detail about your problem?
now my program has a tabbar view how can i show another view for 5 second and then show tabbar view(main view )?
sajjad111 is offline   Reply With Quote
Old 07-12-2010, 12:37 AM   #5 (permalink)
Registered Member
 
Goldoneh's Avatar
 
Join Date: Nov 2009
Location: ایران
Posts: 45
Goldoneh is on a distinguished road
Default I did this later.

Quote:
Originally Posted by sajjad111 View Post
now my program has a tabbar view how can i show another view for 5 second and then show tabbar view(main view )?
I had this problem later , if you want have tab bar in project and you want to show splash at the first time with out tab bar you can manage the tab bar in delegate class and show your splash in delegate too.

Like this :
Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {    

	[self setupDetail];

}

-(void)initViewController
{
	[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
	[[UIApplication sharedApplication] setIsAccessibilityElement:YES];
	[self.navigationController.navigationBar setBarStyle:UIBarStyleBlack];
	UINavigationController *navTemp;
	if (rootViewController==nil)
		rootViewController=[[NSMutableArray alloc] init];
	//init with root viewcontrolker
	
	FirstTabBarItem *viewController1=[[FirstTabBarItem alloc] initWithTitle:@"First"];
	navTemp=[[UINavigationController alloc] initWithRootViewController:viewController1];
	[rootViewController addObject:navTemp];
	[viewController1 release];
	[navTemp release];
	
	SecondTabBarItem *viewController2=[[SecondTabBarItem alloc] initWithTitle:@"Second"];
	navTemp=[[UINavigationController alloc] initWithRootViewController:viewController2];
	[rootViewController addObject:navTemp];
	[viewController2 release];
	[navTemp release];
	
	ThirdTabBarItem *viewController3=[[ThirdTabBarItem alloc] initWithTitle:@"Third"];
	navTemp=[[UINavigationController alloc] initWithRootViewController:viewController3];
	[rootViewController addObject:navTemp];
	[viewController3 release];
	[navTemp release];
	
	FourthTabBarItem *viewController4=[[FourthTabBarItem alloc] initWithTitle:@"Fourth"];
	navTemp=[[UINavigationController alloc] initWithRootViewController:viewController4];
	[rootViewController addObject:navTemp];
	[viewController4 release];
	[navTemp release];
	
	FifthTabBarItem *viewController5=[[FifthTabBarItem alloc] initWithTitle:@"Fifth"];
	navTemp=[[UINavigationController alloc] initWithRootViewController:viewController5];
	[rootViewController addObject:navTemp];
	[viewController5 release];
	[navTemp release];
	
	
	tabBar = [[UITabBarController alloc] init];
	tabBar.customizableViewControllers=rootViewController; 
	tabBar.viewControllers = rootViewController;
	tabBar.customizableViewControllers = rootViewController;
	tabBar.delegate = self;
	tabBar.toolbarItems =rootViewController;
	tabBar.delegate=self;
	[self.navigationController.navigationBar setBarStyle:UIBarStyleBlack];
	
	return;
}

-(void)setupDetail{
	
	UIApplication* myapp = [UIApplication sharedApplication];
	myapp.idleTimerDisabled = YES;
    [self initViewController];
}


-(void)changeView{
	
	[window addSubview:tabBar.view];
	[pic removeFromSuperview];
	[pic release];
	
	
}
-(BOOL)setup
{		
	pic=[[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
	[pic setImage:[UIImage imageNamed:@"splash.png"]];
	
	[window addSubview:pic];
	[window makeKeyAndVisible];
	
	[NSTimer scheduledTimerWithTimeInterval:5.0f  target:self selector:@selector(changeView) userInfo:nil repeats:NO];
	
	}
}

you can use from this code , you should set your class in initViewController .
and set your image in setup , if you have any problem with this code say me.
good luck
__________________
The fantastic free iphone/ipod game:
iWarShip

iMasterMind
Goldoneh is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 330
5 members and 325 guests
anothermine, Chickenrig, givensur, michaelhansen, PixelInteractive
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,892
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:26 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0