我的问题是这样的吗?
I am having a class addEditPatient.m and its Xib . I wants to use the Same xib In Another Class Named patientview.m, this patientview contain it own Xib and a button called Addpatient . i wants to Display the addEditPatient.xib when add button is clicked in patientview class. i don't wants to push the view i want to add the subview to patientview. if Possible can any one give a example ?
答案 0 :(得分:2)
如果我理解你,这将有效,请在patientview类的addButtonMethod中添加以下代码:
AddEditPatient *addEditPatient = [[[AddEditPatient alloc] init] autorelease];
[self.view addSubview:addEditPatient.view];
希望有所帮助