Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题是这样的??
我有一个类 addEditPatient.m 和它的 Xib 。 我想在另一个名为 patientview.m 的类中使用相同的 xib, 这个 patientview 包含它自己的 Xib 和一个名为 Addpatient 的按钮。 我想在 Patientview 类中单击添加按钮时显示 addEditPatient.xib。 我不想推送我想将子视图添加到患者视图的视图。 如果可能的话,任何人都可以举个例子吗?
如果我理解你,这会起作用,在 Patientview 类的 addButtonMethod 中添加这段代码:
AddEditPatient *addEditPatient = [[[AddEditPatient alloc] init] autorelease]; [self.view addSubview:addEditPatient.view];
希望有帮助