Hi...
Can anybody help me... Im trying to merge videoplayback, imagetargets and custom events in one app.
By now the videoplayback and imagetarget with custom 3d object are working like a charm, but the problem is when i try to make custom events for example if im trying to create a overlay view in the camera called by an especific texture recognition, it get crashed...
Can anyone help me to call a view over the camera in this project, this is how i create custom events to the target
else if (playerIndex == 100){ Object3D* obj3D = [objects3D objectAtIndex:OBJECT_KEYFRAME_1 + 7]; frameTextureID = [[obj3D texture] textureID]; aspectRatio = (float)[[obj3D texture] height] / (float)[[obj3D texture] width]; texCoords = quadTexCoords; }
So i was thinking that making something like this will work, but the code crashes
else if (playerIndex == 100){ Object3D* obj3D = [objects3D objectAtIndex:OBJECT_KEYFRAME_1 + 7]; frameTextureID = [[obj3D texture] textureID]; aspectRatio = (float)[[obj3D texture] height] / (float)[[obj3D texture] width]; texCoords = quadTexCoords; CGRect screenBounds = [[UIScreen mainScreen] bounds]; CGRect frame; frame.origin.x = 0; frame.origin.y = 0; frame.size.width = screenBounds.size.height; frame.size.height = screenBounds.size.width; UIImageView *freeze = [[UIImageView alloc]initWithFrame:CGRectMake(frame.origin.x, 44, frame.size.height, frame.size.width)]; [freeze setImage:[UIImage imageNamed:@"blur_5.png"]]; [self addSubview:freeze]; }
I tryed to call from another class like AR_Eagleview.m, OverlayView.m, OverLayViewController.m, ARParentViewController.m, but it always get freeze when i try to make a custom view overlay ... thanks...
The log is pretty meaningless.
Have you narrowed down where the problem is or tried putting any UI on the main thread?
If you want events, you can always use NSNotification to signal and then do what you want.
N