tags:

views:

84

answers:

1

Hi,

I'm not entirely sure why this crash is happening and I'd like to get advice on the best way to deal with it.

My app has 3 buttons. Each button requests a different XML file from a server which is used to populate a table view.

If I rapidly press the buttons in sequence , button 1 button 2 button3 button 1 button 2 button3 button 1 button 2 button3 the application quits.

What could be causing this. Would id be in the NSURLRequest side of things or the table view population side?

How would you suggest I stop this behaviour? I was going to just set a boolean "isRequesting" to true when a button is pressed and set it to false when the table view is finished populating. If any button is pressed while isRequesting is True they do nothing.

Does that sound wise or is there a better way?

Thanks, dub

+1  A: 

when one button is clicked and application is processing it... disable user interaction.. when that event processed re enable user interaction... this may stop application from crashing

you can disable User interaction by

self.view.userInteractionEnabled = NO; 
mihirpmehta
Thats a handy line of code! I'll try it out
dubbeat
That worked nicely, thanks!
dubbeat