"I placed the changing text code inside renderFrameQCAR "
Put this inside another function called say showMessage , but then call that function from within renderFrameQCAR
[self performSelectorOnMainThread:@selector(showMessage:) withObject:message waitUntilDone:NO];
where message is the text you want to set it to.
Does this make sense - need to try it and see if it works...
N
Hi NalinS, thanks for replying.
I couldn't find in existing samples, UI interacting with virtual button press event (which seems not an event really, just something that's getting checked all the time while tracking).
I placed the changing text code inside renderFrameQCAR because that's where the virtual button press event is happening. If I moved the function to the main thread how would I get this event?
Hi cekk,
This might be because renderFrameQCAR is executed via a background thread.
So one thing you could try is to execute the function to change the text on the main thread e.g.
- (void) displayMessage:(NSString*) message
{
[self performSelectorOnMainThread:@selector(showMessage:) withObject:message waitUntilDone:NO];
}
...where showMessage() is the method you have created to set the UI label as you need.
The other option is to see how the existing samples handle UI, as they use use an overlay controller to handle GUI.
HTH
N
Excellent news :)