Don't want to use UINavigationController or UITabBarController?  Then you have a problem as Apple doesn't provide the means to control an apps views programatically very easily, for instance using code like this:

    [viewController.view addSubview:AnotherViewController.view];

This aritcal explains the problem very well.

Solutions

Ignore the porblem!  This might be Ok if your app doesn't need to auto rotate views etc. but ensure you think through any possible consequences by understanding the problem.

Do as the Carbon Five artical suggests.

Can each view be displayed modally from a single main view?  If you don't need to autorotate etc then this may work out fine and there is a working example below.

Displaying Views Modally From A Single Main View

This works fine for many types of apps

(This example assumes you have a global synthesized class called AppMain as detailed here)

In AppMain.h

#import "MainViewController_iPhone.h"      //This is the dummy / main view controller all other views are shown above

#define VIEW_NULL          0
#define VIEW_A                1
#define VIEW_B                2

@interface AppMain : NSObject
{
    MainViewController_iPhone *MainViewController_iPhone1;
}
@property (nonatomic, retain) MainViewController_iPhone *MainViewController_iPhone1;
+ (AppMain *)sharedAppMain;         //Needed for synthesized global class
- (void)SetNewView:(int)View;
@end
In AppMain.m

#import "ExampleAViewController_iPhone.h"
#import "ExampleBViewController_iPhone.h"

@synthesize MainViewController_iPhone1;

//**********************************
//**********************************
//********** SET NEW VIEW **********
//**********************************
//**********************************
//This app uses MainViewController_iPhone as a dummy / main view controller over which all other views are shown as modal, to allow us to programatically control views
- (void)SetNewView:(int*)View
{

    //Close any existing modal view controller
    [MainViewController_iPhone1 dismissModalViewControllerAnimated:NO];

    //Do tests for forcing certain views etc
    if (View == VIEW_NULL)
        View = VIEW_A;

    if (View == VIEW_A])
    {
        ExampleAViewController_iPhone *vc1 = [[ExampleAViewController_iPhone alloc] init];
        [MainViewController_iPhone1 presentModalViewController:vc1 animated:NO];
        [vc1 release];
    }
    else
    {
        ExampleBViewController_iPhone *vc1 = [[ExampleBViewController_iPhone alloc] init];
        [MainViewController_iPhone1 presentModalViewController:vc1 animated:NO];
        [vc1 release];
    }
}
In appnameAppDelegate.m

//********** DID FINISH LAUNCHING WITH OPTIONS **********
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //----- CREATE MAIN VIEW -----
    //This is the background view over which all other views are shown, it may be a blank dummy view or a working view controller
    [AppMain sharedAppMain].MainViewController_iPhone1 = [[MainViewController_iPhone alloc] init];
    [self.window addSubview:[[AppMain sharedAppMain].MainViewController_iPhone1 view]];
	[self.window makeKeyAndVisible];	//Show the window

    //Call our fucntion to display the requried view
    [[AppMain sharedAppMain] SetNewView:VIEW_NULL];

    return YES;
}
To Close A View From Its #ViewController.m file

        //Close this view
        [self dismissModalViewControllerAnimated:NO];

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.

Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. cheap jordans

    I’m typically to blogging and i seriously appreciate your content. The article has truly peaks my interest. I am going to bookmark your webpage and maintain checking for new details.
    [url=http://gujjar.org/blogs/post/6575]cheap jordans[/url]

  2. retro jordans

    I discovered your blog web-site on google and check a few of your early posts. Continue to maintain up the especially good operate. I just further up your RSS feed to my MSN News Reader. Seeking forward to reading a lot more from you later on!
    [url=http://jordansfyek.hazblog.com/Primer-blog-b1/Air-Jordans-b1-p3.htm]retro jordans[/url]

  3. Maricruz Monarrez

    Hey very cool site!! Man .. Beautiful .. Amazing .. I will bookmark your blog and take the feeds also…I’m happy to find so many useful information here in the post, we need develop more strategies in this regard, thanks for sharing. . . . . .

  4. timberland coupons outlet

    La nouvelle rhétorique dépasse les limites du discours rationnel que les enseignant de rhétorique valorisent si fortement et à la promotion duquel ils se consacrent; la nouvelle rhétorique est persuasion par une stratégie de force et de coercition plutt que par la raison et par des modalités démocratiques de prise de décisions (102).

  5. ray ban aviator small frame

    ein Schlag Team-Mitglied ist jemand, der im Lagerraum arbeitet, hinter den Kulissen arbeiten. ein Modell ist jemand, der vor funktioniert, halten die Dinge ordentlich und hilft Kunden. Auch ich auf jeden Fall nicht zu h盲sslich, und das Ger眉cht, dass nur h盲ssliche Leute sind engagiert, um in den R眉cken zu arbeiten, ist nicht wahr, denn es gibt eine Menge hei脽e M盲dchen, die in den R眉cken zu arbeiten.

  6. prada amber man yorum

    Kate Spade handbags have come a long way from the first collection of nylon handbags. A variety of colors, textures, and shapes are now available, and I’ve included a bit of everything in my top picks below.

  7. actifry reviews

    I think this is among the most significant information for me. And i am glad reading your article. But wanna remark on some general things, The web site style is ideal, the articles is really nice : D. Good job, cheers

  8. plearserb

    the give everybody flags

    Headhunting [url=http://www.ourdomicile.ca/]http://www.ourdomicile.ca/[/url] services are not cheap. The fee for executive search services range from 25 to 33 1/3 [url=http://www.ourdomicile.ca/canada-goose-chilliwack-parka-7950m-light-grey-cg130-p-513.html]canada goose chilliwack parka[/url] [url=http://www.ourdomicile.ca/]canada goose outlet toronto[/url] percent of the position total [url=http://www.ourdomicile.ca/]canadagoose.ca[/url] annualized first year compensation, including bonuses. The norm for the industry appears to be 30 percent, although home based establishments normally charge 25 percent to be more competitive relative to office based [url=http://www.ourdomicile.ca/]canada goose outlet toronto[/url] competitors..

    [url=http://www.wohnzimmer.co.uk/]North Face Outlet Uk[/url]
    [url=http://www.sproutart.co.uk/]North Face Outlet[/url]
    [url=http://www.proroofcleaning.co.uk/]North Face uk[/url]
    [url=http://www.blackroots.co.uk/]michael kors outlet uk[/url]
    [url=http://www.pinkwizard.co.uk/]michael kors outlet[/url]
    [url=http://www.pdrco.co.uk/]cheap michael kors[/url]
    [url=http://www.rodelfishery.co.uk/]cheap michael kors bags[/url]
    [url=http://www.cfcresults.co.uk/]michael kors bags[/url]
    [url=http://www.blauerdiamant.com/]michael kors bags uk[/url]
    [url=http://www.2xescorts.co.uk/]michael kors outlet uk[/url]
    [url=http://www.jeepai.co.uk/]Louis Vuitton Outlet Uk[/url]
    [url=http://www.abbcom.co.uk/]christian louboutin outlet uk[/url]
    [url=http://www.bbme.co.uk/]cheap christian louboutin shoes[/url]
    [url=http://www.stokk.co.uk/]louboutin outlet uk[/url]
    [url=http://www.royalcorpsnews.co.uk/]christian louboutin outlet uk[/url]
    [url=http://www.basfa.co.uk/]louboutin outlet uk[/url]
    [url=http://www.xxfx.co.uk/]christian louboutin outlet uk[/url]
    [url=http://www.sagt.fr/]http://www.sagt.fr/[/url]
    [url=http://www.aegt.de/]christian louboutin[/url]
    [url=http://www.ancare.co.uk/]Louis Vuitton Outlet UK[/url]
    [url=http://www.fosig.co.uk/]Louis Vuitton Outlet[/url]
    [url=http://www.virtualapps.co.uk/]Louis Vuitton Outlet UK[/url]
    [url=http://www.pinkwizard.co.uk/]Michael Kors Outlet uk[/url]
    [url=http://www.pdrco.co.uk/]cheap Michael Kors bags[/url]
    [url=http://www.themenai.co.uk/]cheap beats by dre[/url]
    [url=http://www.lottodog.co.uk/]cheap beats by dre[/url]
    [url=http://www.sproutart.co.uk/]north face outlet uk[/url]
    [url=http://www.wohnzimmer.co.uk/]north face jackets uk[/url]
    [url=http://www.scc95.fr/]Hollister Pas Cher[/url]
    [url=http://www.totell.ca/]wholesale golf clubs[/url]
    [url=http://www.thvs.ca/]wholesale golf clubs[/url]
    [url=http://www.thebridgepp.co.uk/]http://www.thebridgepp.co.uk/[/url]

  9. rental property

    Hey! This is kind of off topic but I need some guidance from an established blog. Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about making my own but I’m not sure where to start. Do you have any ideas or suggestions? Cheers

  10. scarpe timberland uomo kijiji

    Destructive diseases are mostly caused by fungal infections, of which some include verticillium wilt, canker or dieback, and leaf spots. To save your infected trees, early identification is necessary. Consider discarding the diseased parts properly and spraying them with appropriate fungicides. Insects affecting redbud trees are spider mites, scale insects, and tree hoppers. In case of pest attacks, simply remove them at the first sight and follow cultural practices to control them.

  11. from prada to nada hmv

    Lucca, 13 marzo 2009 Il rapinatore era stato arrestato l scorso dai carabinieri del nucleo investigativo del comando provinciale, diretto dal tenente Sebastiano Pennisi. A incastrarlo erano stati gli accurati accertamenti investigativi, ma anche la fatale distrazione dello stesso bandito, forse un po troppo sicuro di s Aveva infatti lasciato nella filiale lunatese della cassa di Risparmio di Prato un digitale e perfino il proprio telefonino, perso dentro l di credito durante la rapina lampo. Quel pomeriggio del 22 agosto scorso, era entrato nella banca di Lunata con una pistola in pugno, a volto scoperto e indossando una tenuta da mare: pantaloncini corti e scarpe da ginnastica. Davanti a lui, nella filiale, non c clienti, solo il direttore e un impiegato. Un momento scelto per agire a colpo sicuro. i soldi. aveva detto, saltando il bancone e impossessandosi di circa 7.700 euro in contanti, prelevati direttamente dalla cassa. Poi si era allontanato in fretta a piedi, salendo quindi su una vettura, forse una Fiat Punto, parcheggiata non lontana dall di credito, sulla quale l probabilmente un complice.

  12. air jordan 6 sale philippines

    The 1994 Conference was explicitly given a broader mandate on development issues than previous population conferences, reflecting the growing awareness that population, poverty, patterns of production and consumption and the environment are so closely interconnected that none of them can be considered in isolation.

  13. ray ban wayfarer junior sizes

    If you are buying a home in the Phoenix area, you might want to avoid planting the following trees if allergies are a concern. Likewise, if you are an apartment dweller, it may be important to find out what those trees are outside your balcony before you sign a lease and find out they are olive trees!Arizona Ash

  14. hogan uomo prezzi bassi

    Sin embargo, en 1953 decidi que ya era hora de “volver al trabajo real cuanto antes”. “No s a qu ni adnde, pero la poca de las pelculas se ha acabado”, escribi en una de sus cartas. Y as, Capa, cuyo verdadero nombre era Endre Ern Friedmann, fue a la guerra colonial de Indochina, donde tambin hizo algunas de sus ms hermosas instantneas en color y donde el 25 de mayo de 1954 muri tras pisar una mina antipersonal. EFEUSA.El Hadji Diouf proved he can handle the stick in bruising Rangers debut

  15. Mitch Goldbach

    Youre so cool! I dont suppose Ive read anything like this just before. So nice to locate somebody with some original thoughts on this topic. realy thank you for starting this up. this web page is some thing that is needed on the internet, someone with a small originality. valuable job for bringing some thing new to the web!
    jordan sneakers

  16. negozi scarpe gucci a roma

    We do not pay you 1050% commissions with small either, you make 100% commissions on everything you sell! Then aim That throws people off. OOOOH I gotta sell stuff. Do not worry this just Sends me an email saying you are interested so I can send you more info about Empower Network. I in no way shape or form Will sell your email address so you can get spammed to death. No its just from me, Brent Risser. With all the proper health care insurance program, you Will Be Able to reap the benefits of it, whatever your real age. Browsing fo. Moreover’s, the low carb happy in almond milk Makes. Opt to personalize the tings you’ve Chosen to Produce ‘em more special and memorable in your containers. Here are only a Few tips That you are ble to take Towards th. It can make you feel as if you-have-been in debtors’ prison, with no wish of evade. Keep reading for a Few strategies to your right and reclaim your credit rating. They get restriction and deprivation, cause a loss of company That Will hel.

  17. air jordan jeter throwback shoes

    Palermo, 21 gen . (Adnkronos) Centinaia di etichette metalliche ed in tessuto di note marche quali Gucci, Prada, Liu Jo, Chanel e Louis Vuitton pronte per essere applicate su capi di abbigliamento, calzature e articoli da viaggio, ma anche accessori e scarpe con marchio Nike e Lacoste completamente contraffatti e già assemblati, pronti per essere immessi sul mercato del falso palermitano. E’ quanto scoperto dalla Guardia di Finanza di Palermo all’interno di una fabbrica clandestina nel quartiere Ballarò, a seguito di indagini svolte dal Nucleo di Polizia Tributaria e mirate all’individuazione dei canali di rifornimento della merce contraffatta dei numerosi venditori abusivi presenti in città.

  18. Alonzo

    fantastic submit, very informative. I ponder why the other specialists of this sector do not realize this. You should proceed your writing. I am sure, you’ve a great readers’ base already!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>