Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-05-2009, 12:33 AM   #2 (permalink)
erfmufn
iPhone Neophyte
 
Join Date: Mar 2009
Posts: 41
Default

Well through some trial and error I've worked out I don't need a third controller and I can call a switch method in the delegate which is pretty neat. Now my only problem is that it ignores the landscape orientation I've set.

Code:
- (void)switchView 
{
    if (instructionsViewController == nil)
    { 
        [viewController.view removeFromSuperview];
        [viewController release];
        viewController = nil;
		
        instructionsViewController = [[InstructionsViewController alloc]init];
        [window addSubview:instructionsViewController.view];
    }
    else
    {
        [instructionsViewController.view removeFromSuperview];
		[instructionsViewController release];
		instructionsViewController = nil;
		
		viewController = [[PianoTutorViewController alloc]init];
        [window addSubview:viewController.view];
    }
}
Not sure if code is elegant, but works apart from the landscape issue.
erfmufn is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,181
Threads: 38,954
Posts: 170,899
Top Poster: smasher (2,565)
Welcome to our newest member, Zephyros
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:29 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.