如题,当前在登陆界面,用户登陆后几乎不会再回到该界面,所以想释放掉该界面的内存并跳转到主界面。不太理解presentmodelview的过程,但是dissmiss后会回到以前的界面,好像以前的界面并没有释放内存。求人解答下该方法具体的过程以及怎么实现我要的效果。navigationviewcontroller好像不太行---代码---NewJourneyViewController*addJourneyView=[[NewJourneyViewControlleralloc]init];UINavigationController*navAddViewController=[[UINavigationControlleralloc]initWithRootViewController:addJourneyView];[addJourneyViewrelease];[selfpresentViewController:navAddViewControlleranimated:YEScompletion:nil];[navAddViewControllerrelease];这里present了viewB,viewB里面只有个retian的uitextfield,在viewB的viewDIdLoad里面初始化,代码如下。_nameJourney=[[UITextFieldalloc]initWithFrame:CGRectMake(25,64+25,270,30)];_nameJourney.placeholder=@"旅程标题";_nameJourney.clearButtonMode=UITextFieldViewModeWhileEditing;_nameJourney.borderStyle=UITextBorderStyleRoundedRect;_nameJourney.delegate=self;_nameJourney.returnKeyType=UIReturnKeyDone;[_nameJourneybecomeFirstResponder];[self.viewaddSubview:_nameJourney];
慕虎7371278
幕布斯7119047
相关分类