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