弹出视图控制器时应用程序崩溃 [英] Application is crashing while poping view controller

查看:111
本文介绍了弹出视图控制器时应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您的图片可能已经通过Apple的pngcrush程序运行,因此不再是有效的PNG文件。我被告知Apple的pngcrush有一种方法可以恢复损坏并从压缩的文件中重新创建一个有效的PNG,可能会丢失一些数据。如果您可以查看文件的开头并且字节CgBI从字节12开始而不是IHDR,那将确认该文件确实已经被苹果pngcrushed。

Your images have probably been run through Apple's "pngcrush" program and therefore are not valid PNG files any more. I'm told that Apple's "pngcrush" has a way of reverting the damage and recreating a valid PNG from the crushed file, perhaps with some loss of data. If you can look at the beginning of the file and the bytes "CgBI" appear starting at byte 12 instead of "IHDR", that will confirm that the file has indeed been apple-pngcrushed.

推荐答案

啊!

@vivek,而不是这一行:

@vivek, instead of this line:


[self.navigationController pushViewController:paymentViewController.visibleViewController animated:NO];

[self.navigationController pushViewController:paymentViewController.visibleViewController animated:NO];

尝试这个(根据我们的示例代码):

try this one (as per our sample code):


[self presentViewController:paymentViewController animated:YES completion:nil];

[self presentViewController:paymentViewController animated:YES completion:nil];

而且,而不是这一个:


[self.navigationController popToRootViewControllerAnimated:YES];

[self.navigationController popToRootViewControllerAnimated:YES ];

使用此:


[self dismissViewControllerAnimated:YES com pletion:nil];

[self dismissViewControllerAnimated:YES completion:nil];

这篇关于弹出视图控制器时应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆