开发者

how to add multiple navigation controllers

开发者 https://www.devze.com 2023-01-13 07:18 出处:网络
hi i am new toiphone. what i did is creating classes named classone.h,classone.m, classoneviewcontroller.h,classoneviewcontroller.m and creating navigatonviewcontroller in classoneAppDelgate.h , .m .

hi i am new to iphone. what i did is creating classes named classone.h,classone.m, classoneviewcontroller.h,classoneviewcontroller.m and creating navigatonviewcontroller in classoneAppDelgate.h , .m . now what i need is along with these classes i have to cret开发者_如何转开发e new class named classtwo with viewcontroller, and i have to call new to class from existing class how can i done this pls help me post some code. thank u.


suppose you click on a button on classone to call classtwo then on the click event of that button write

-(void)navigateToNextController
{
    classtwo *objclasstwo = [[classtwo alloc] initWithNibName:@"classtwo" bundle:nil];
    [self.navigationController pushViewController:objclasstwo animated:YES];
    [objclasstwo release];
}

Happy Coding...

0

精彩评论

暂无评论...
验证码 换一张
取 消