• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iPhone] newbie Q: switching between two views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] newbie Q: switching between two views


  • Subject: Re: [iPhone] newbie Q: switching between two views
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 30 Jun 2009 18:45:28 -0700

On Tue, Jun 30, 2009 at 5:50 PM, Beth Freeman<email@hidden> wrote:
> DesignMeditationsAppDelegate:
>
> - (void)applicationDidFinishLaunching:(UIApplication *)application {
>
>
>    // Override point for customization after application launch
>
> [window addSubview:meditationViewController.view];
>
> [window addSubview:aboutViewController.view];

If you want to swap between subviews, why are you adding both of them?

>
> [window bringSubviewToFront:meditationViewController.view];
>
>        [window makeKeyAndVisible];
>
> }
>
>
> - (void) switchViews:(UIView *)aView {
>
> [window bringSubviewToFront:aView];
>
> [window makeKeyAndVisible];

This is unnecessary... seems like evidence of cargo-cult programming.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[iPhone] newbie Q: switching between two views (From: Beth Freeman <email@hidden>)

  • Prev by Date: Re: How Do I Statically Link to libcurl?
  • Next by Date: Re: GC bug in NSFontManager?
  • Previous by thread: [iPhone] newbie Q: switching between two views
  • Next by thread: How Do I Statically Link to libcurl?
  • Index(es):
    • Date
    • Thread