转到上一个 ViewController 时应用程序崩溃
您好,当我点击后退按钮时,我的 iPhone 应用程序崩溃了。我真的不知道为什么会这样。您可以在图片中看到我的应用程序崩溃的地方。
我已经检查过我的按钮仅与一个连接行动。所以我无法确切知道问题是什么。
如果我的问题很愚蠢,请原谅我,我是 iPhone 开发新手,所以请帮助
Infect 我正在使用带有设备的打印机,我认为存在一些问题
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.8 green:0.8 blue:1 alpha:1] CGColor],(id)[[UIColor colorWithRed:0.05 green:0.05 blue:0.38 alpha:255] CGColor], nil];
//creating the iEpsonCom objects
m_deviceParams = [[DeviceParameters alloc] init];
m_device = [[Device alloc] init];
//registering the callback
[m_device registerCallback:self withSelector:@selector(callbackMethod:)];
//creating a thread for regularly checking the connection state
m_Thread = [[ThreadClass alloc] init];
[m_Thread registerCallback:self withSelector:@selector(connectionStateThreadCallbackMethod:)];
[m_Thread setMilliseconds:300]; //check the connection state every 300 ms
[m_Thread start]; //start the thread
Hi My iPhone application is crashing when i tap on back button. I really don't know why this is happening. you can see in picture where my application is crashing.
I have already checked that my button is connected only with one action. So I am failed to know exactly what is the problem.
If my question silly then plz forgive me, I am new to iPhone development So please help
Infect i am using printers with device and i think there is some problem
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.8 green:0.8 blue:1 alpha:1] CGColor],(id)[[UIColor colorWithRed:0.05 green:0.05 blue:0.38 alpha:255] CGColor], nil];
//creating the iEpsonCom objects
m_deviceParams = [[DeviceParameters alloc] init];
m_device = [[Device alloc] init];
//registering the callback
[m_device registerCallback:self withSelector:@selector(callbackMethod:)];
//creating a thread for regularly checking the connection state
m_Thread = [[ThreadClass alloc] init];
[m_Thread registerCallback:self withSelector:@selector(connectionStateThreadCallbackMethod:)];
[m_Thread setMilliseconds:300]; //check the connection state every 300 ms
[m_Thread start]; //start the thread
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是您以前的视图控制器丢失了,所以首先检查您希望弹出的控制器是否仍在视图控制器堆栈中?
如果您在该堆栈中看不到要弹出的视图控制器,则可能需要保留该控制器。也可能是您释放了太多,例如在
dealloc
方法中。It might be that your previous view controller is lost so first check, is the controller that you wish to pop to still in the view controller stack?
If you can't see the view controller you want to pop to in that stack, it's likely that you either need to retain the controller. It might also be possible that you have released it too much, for example in the
dealloc
method.