ios开发 判断当前ViewController是push还是present的方式显示的

来源:互联网 发布:部落冲突龙数据 编辑:程序博客网 时间:2024/05/03 19:17
NSArray *viewcontrollers=self.navigationController.viewControllers;if (viewcontrollers.count > 1){    if ([viewcontrollers objectAtIndex:viewcontrollers.count - 1] == self)    {        //push方式       [self.navigationController popViewControllerAnimated:YES];    }}else{    //present方式    [self dismissViewControllerAnimated:YES completion:nil];}

阅读全文
0 0
原创粉丝点击