我正在申请Ipad.in这个应用程序我有一个UIButton在我的第一个类Xib,现在我想添加第二个类XIB在按钮click.i第一个类XIB我知道如何调用第二类XIB。这仅仅是这样的..我们如何在主类Xib中添加子类Xib?
-(IBAction)displaysecondclass
{
secondview *sec=[[secondview alloc] initWithNibName:@"secondview" bundle:nil];
[self presentModalViewController:sec animated:YES];
[sec release];
}
但我不想去二等,我需要显示上的firstView就这样第二类XIB。
-(IBAction)displaysecondclass
{
secondview *sec=[[secondview alloc] initWithNibName:@"secondview" bundle:nil];
[self.view addSubView:sec];
}
任何人都可以帮助我如何在第一个view.thanx预先添加第二类xib。
uh ..huh?假设'first view',你的代码已经将'second class'视图添加到'self'中。不知道我明白你.. – skram
是你确定secondview类xib文件名为secondview? – Dinesh
@skram我不想要这样,我在第一个视图中添加第二课。 – jamil