Reputation: 3024
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
Upvotes: 0
Views: 162
Reputation: 2055
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?
NSArray *arrView = [self.navigationController viewControllers];
NSLog(@"arrView %@",arrView);
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.
Upvotes: 3