Re: [iPhone] newbie Q: switching between two views
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