I am working on application for Ipad.in this application i have a UIButton on my first class Xib ,Now i want to add second class XIB in this first Class XIB on Button click.i know the how to call second class XIB.which is just like this..
-(IBAction)displaysecondclass
{
secondview *sec=[[secondview alloc] initWithNibName:@"secondview" bundle:nil];
[self presentModalViewController:sec animated:YES];
[sec release];
}
But i not want to go secondclass ,i need to display second class XIB on firstview just like this.
-(IBAction)displaysecondclass
{
secondview *sec=[[secondview alloc] initWithNibName:@"secondview" bundle:nil];
[self.view addSubView:sec];
}
can any one help me how to add second class xib in first view.thanx in advance.
change the button code to
Please note that you will need to add additional functions to release the viewcontroller once you dont need it anymore