I ran into a very strange user interaction problem, showing an overlay view with a progress indicator.
On the main screen, I have the previous and next buttons and clicking on the next button, I make a web service call, and during this process I show an overlay view with a progress indicator as follows.
[self createProgressViewWithMessage:@"Loading..."]; [self.view bringSubviewToFront:self.inProgressView]; [self.inProgressView becomeFirstResponder]; [NSThread detachNewThreadSelector:@selector(search:) toTarget:self withObject:info];
After a successful search, I update the list of records, and also enable and disable the previous and next buttons. Showing the overlay view, clicking on the previous or next buttons, the events are queued and called when the web service call is completed. To avoid these things in the queue, I tried several ways, such as calling [[UIApplication sharedApplication] beginIgnoringInteractionEvents] before creating a progress view and calling [[UIApplication sharedApplication] endIgnoringInteractionEvents] after the web service session ends, but after that the events are called after that.
I even tried to make the main view by setting userInteractionEnabled = NO , while viewing the overlay is present, but still useless.
Tried all possible ways, but still useless. I donβt know why the events are queued and called after the end of the web service call.
Can someone help me in solving this problem? I do not want events to be queued while the overlay view is displayed. I mean that events should not be transmitted to the previous and next buttons that are on the main screen while the overlay is being viewed.
source share