SCNView到UIView?
答
未必是最优雅的方式做,但这样的事情可能会为你工作.....
- (void) handleTap:(UITapGestureRecognizer*)gestureRecognizer {
// get tap location
CGPoint p = [gestureRecognizer locationInView:scnView];
// convert to sk scene coordinates
CGPoint p2D = [scnView.overlaySKScene convertPointFromView:p];
//test if we hit the login button
SKNode *loginButton = [scnView.overlaySKScene nodeAtPoint:p2D];
// assuming your loginButton is of type SKLabelNode
if (loginButton != nil && ([loginButton isMemberOfClass:[SKLabelNode class]] )) // add other tests here
{
// Here you can add code to transition to another
// view controller to handle logins
} else {
// do hit test on scnView here for the 3D scene
// .........
}
}