Log in or register to post comments

Change Overlay Buttons when Marker is detected

January 13, 2013 - 2:09am #1

Hi,

i want to show/hide some Overlay Buttons when the marker is detected. I started my project from the FramMarkers Example.

Now i have add the methods in the ButtonOverlay Class to show and hide the Buttons and this method is called frmo the renderFrameQCAR in EAGLView when the marker is detected.

The methode calls works correctly and i also can change the Buttons values (tested with NSLog prints) but the changes om the Buttons are not visible or updated.

I have tested to set setNeedsDisplay on the Views but nothing changed.

For debugging i have add a Button that calls this methode and with the User interaction it works in the correct way, Buttons hidden state were switched.

I hope someone here can help me what's wrong and how i can trigger the Update of this Overlay View.

 

Thanks
             Sascha

Hi Sascha,   It could be that

January 14, 2013 - 1:34am #2

Hi Sascha,

 

It could be that because the rendering is carried out within a background thread, updates to the UI are not being carried across.

From my experience changing/updating the UI needs to be done on the main thread, so it is probably worth a try to wrap up this functionality and call it within on the main thread using PerformSelectorOnMainThread.

Please try this and let me know how you get on.

thanks,

N

Log in or register to post comments