Hi Guys, here the following code is used to view the present modal view controller.
[[self navigationController] presentModalViewController:doctorListViewNavigationController animated:YES];
the close action is in the next view controller(DoctorListViewController). You can understand by seeing the following code I added now cleary. -(void)doctorsListAction { if(isFirst == YES) { [self getDoctorsListController]; [[self navigationController] presentModalViewController:doctorListViewNavigationController animated:YES];
}
}
-(void)getDoctorsListController { DoctorListViewController *doctorListViewController=[[DoctorListViewController alloc]init]; doctorListViewController.doctorList=doctorList; doctorListViewNavigationController=[[UINavigationController alloc]initWithRootViewController:doctorListViewController]; doctorListViewNavigationController.navigationBar.barStyle= UIBarStyleBlackOpaque; [doctorListViewController release];
code in next DoctorListViewContrller to dismiss the view. code for dismiss the ModalViewController. -(void)closeAction { [[self navigationController] dismissModalViewControllerAnimated:YES]; }
My problem is the dealloc method is not called then I am getting memory issue problems like object allocations, leaks..
(void)dealloc {
[doctorList release]; [myTableView release]; [super dealloc]; }