开发者

How to go back to the original view using pop view controller

开发者 https://www.devze.com 2023-03-24 07:14 出处:网络
I have a button & when i click on button it moves to another view controller then there is a back button when i click on that it takes time to go开发者_运维问答 back

I have a button & when i click on button it moves to another view controller then there is a back button when i click on that it takes time to go开发者_运维问答 back

I am doing it like this

GeoNewsViewController*targetController=[[GeoNewsViewController alloc] init];
[self.navigationController pushViewController:targetController animated:YES];


-(void) viewWillDisappear:(BOOL)animated{

    //remove unnecessary code here if u have

    //if u use any webservice then cancel connection here

    //stop any animations if

}

You can programatically go back with animation like this

        [self.navigationController popViewControllerAnimated:YES];
0

精彩评论

暂无评论...
验证码 换一张
取 消