0

在我的项目中,我使用的是 arc,但我仍然面临内存问题。谁能告诉我如何删除它们?

-(IBAction)familyHistoryBtnClicked:(id)sender
{
    FamilyHistoryViewController *FamilyViewController=[[FamilyHistoryViewController alloc]initWithNibName:@"FamilyHistoryViewController" bundle:nil];
    FamilyViewController.view.frame = CGRectMake(0, 50 , 809, 748);
    FamilyViewController.view.tag=112;
    [self removeSubview:112];

    [self.view addSubview:FamilyViewController.view];
}

-(IBAction)pastMedicalHistoryBtnClicked:(id)sender
{
    MedicalHistoryViewController *medicalViewController=[[MedicalHistoryViewController alloc]initWithNibName:@"MedicalHistoryViewController" bundle:nil];
    medicalViewController.view.frame = CGRectMake(0, 50 , 809, 748);
    medicalViewController.view.tag=113;
    [self removeSubview:113];
    [self.view addSubview:medicalViewController.view];

}
4

0 回答 0