UIButton as back button, without addSubView
i have two views 1st one is displaying list (uitableview used), user will select one row from list and go to 2nd view
in 2nd view i am colleting data from server and displaying data on label or text fieldnow in second view I hide my back button(navigation bar) and add new UIbutton as Discon开发者_Python百科nect(using interface builder)
so when user press on this Disconnect button he should move back to 1st view.
but without [self.view addSubView:1stview.view]; --- because this one is not working as what i want.
Thank you in advance
@pooja add this code in your 2nd View and you please connect this IBAction to you disconnect button
(IBAction) moveToFist {
[self.navigationController popViewControllerAnimated:YES];
}
On that disconnect button's IBaction method
write
[self.navigationController popViewControllerAnimated:YES];
精彩评论