to load view from second view to back view
i have application in which i have display question on allcar开发者_如何学Pythond view and all answer are displayed on backside of view.i done this by addsubview:ansview in allcardmethod. now i have onr button that will on ansview function of that button is that to go to allcard to dispaly new question but i can not achived this.... please help
if you can use navigation Controller than use
[self.navigationcontroller pushViewController:viewController animated:YES];
where viewController is object of your controller class
and also you can use
[self.navigationController popToViewController:YES];
if u can add view using addSubView method than use removeFromSuperView method
If i understand it correctly,you want to remove your second view from super view.try this code
[ansview removeFromSuperview];
also try this
[self.navigationController popViewControllerAnimated:YES];
精彩评论