[SDL] Scruffy3D Released! (William Dyce)

Brian Barnes ggadwa at charter.net
Fri Jul 29 06:07:12 PDT 2011


I think Sam added a function that makes this unnecessary , I don't recall the name.

Here IS how we used to do it.


-(void) swapViews {
	UIWindow *windows = [[UIApplication sharedApplication] keyWindow];
	NSLog(@"the app has %d views ",[windows.subviews count]);
	//toggle_pause();
	UIView *view = [window.subviews objectAtIndex:0];
	[view removeFromSuperview];
	[windows addSubview:view];
}



-(void) swapViewsWithTransition {
	UIWindow *windows = [[UIApplication sharedApplication] keyWindow];
	UIView *firstView = [window.subviews objectAtIndex:0];
	UIView *secondView = [window.subviews objectAtIndex:1];       
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1];
	[UIView setAnimationTransition:([secondView superview] ? UIViewAnimationTransitionFlipFromRight : UIViewAnimationTransitionFlipFromLeft) forView:firstView cache:YES];
	[firstView removeFromSuperview];
	[windows addSubview:firstView];
	[UIView commitAnimations];




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110717/c0485517/attachment-0008.htm>


More information about the SDL mailing list