UIPageControl and delay in appearing?

The problem is I'm performing a lengthy background process and I've inadvertently and ultimately called updateCurrentPageDisplay etc. from this secondary thread. UIKit is not thread-safe and blocks this call until it can move it to the main thread, hence the delay.

Up vote 0 down vote favorite share g+ share fb share tw.

(I have set defersCurrentPageDisplay to NO. ) I have an instance of UIPageControl which is configured (number of pages, current page and then updated) when my view appears. However there is a short, fixed delay before it appears to the user.

I'd like it to appear right away. Otherwise it's working fine. Iphone ios uipagecontrol link|improve this question edited Sep 13 '11 at 4:26 asked Sep 13 '11 at 1:33SK92,38621834 75% accept rate.

– Sherman Lo Sep 13 '11 at 4:36 I've tried in both and I still have the problem. I assume that the page control is supposed to appear immediately? (I haven't used this object previously.

) – SK9 Sep 13 '11 at 4:52.

The problem is I'm performing a lengthy background process and I've inadvertently and ultimately called updateCurrentPageDisplay etc. from this secondary thread. UIKit is not thread-safe and blocks this call until it can move it to the main thread, hence the delay. To solve this, I've subclassed UIPageControl creating "wrapper" methods that push calls to super onto the main thread.

I can then safely forget about this every time I need to speak with my page controls. For example: - (void) updateCurrentPageDisplay { @synchronized(self) { if (UIDevice currentDeviceSupportsGrandCentralDispatch == YES) { dispatch_async(dispatch_get_main_queue(), ^{ super updateCurrentPageDisplay; }); } else { super performSelectorOnMainThread:@selector(updateCurrentPageDisplay) withObject:nil waitUntilDone:NO; } } }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions