2012-05-16 23 views
2

我的問題就像這樣?如何在另一個類中填充Xib

 
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 ? 

回答

2

如果我理解你,這會工作,在patientview類的addButtonMethod添加以下代碼:

AddEditPatient *addEditPatient = [[[AddEditPatient alloc] init] autorelease]; 
[self.view addSubview:addEditPatient.view]; 

希望幫助

+0

謝謝你這麼這樣,ORUS它適用於我。 –

相關問題