I developed a 3d cube consist of 6 layer side by side to form a cube type structure. I am getting the layer info on click using touch event.
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if ([touches count] == 1) {
for (UITouch *touch in touches) {
CALayer *layer = [(CALayer *)self.layer.presentationLayer hitTest:point];
layer = layer.modelLayer;
if([[layer valueForKey: @"isClicked"] isEqualToString:@"btnClicked"])
{
if([[layer valueForKey: @"diceFace"] isEqualToString:@"face1"])
{
// i want to open new view.....
}
}
}
What i want is to open a new view controller on clicking any side of the cube in a layer. How can i do this ?