ios - How to Switch Views -
i know has been answered before in different ways, novice programmer , need contextual help. have basic application has multiple view controllers (.h, .m, .xib each. ex. about.h, about.m, about.xib, options.h, options.m, etc.). need switch between them on press of button.
i had been using:
xxxviewcontroller *titlescreen = [[xxxviewcontroller alloc] initwithnibname:@"xxxviewcontroller" bundle:[nsbundle mainbundle]]; [self.view addsubview:titlescreen.view]; [xxxviewcontroller release];
and worked fine switch views. noticed in instruments, overall/net bytes kept climbing, without "releasing" view came from.
am doing wrong? please help... i'm desperate!
you aren't switching views, you're just adding 1 on top of other way. if want navigate between different views, chances are, want a navigation controller.
Comments
Post a Comment