Is there anyway I can get pinch to zoom working for my game when it is running on the iPhone?
I made the game for a class project using Stencylworks. The game runs perfect on the iPad and also works on the iPhone except the scenes are zoomed in which makes it very difficult to play.
Is there any way to implement a pinch gesture that zooms out? Maybe it can be done in Xcode with a view controller or adding code somewhere?? I am new to Xcode so I have absolutely no idea how to get this working!
Not sure if this will help but here are some screen shots of the project.
https://sites.google.com/site/boomblocksgld/pinch-to-zoom
>
#import <Box2D/Box2D.h> #import <Foundation/Foundation.h> #import <AudioToolbox/AudioServices.h> #import "SceneScript.h" #import "Script.h" #import "Actor.h" #import "ActorType.h" #import "Assets.h" #import "Behavior.h" #import "Game.h" #import "GameModel.h" #import "GroupDef.h" #import "FadeInTransition.h" #import "FadeOutTransition.h" #import "Region.h" #import "Runnable.h" #import "Scene.h" #import "SHThumbstick.h" #import "Sparrow.h" #import "Transition.h" #import <Foundation/Foundation.h> #import <CoreGraphics/CoreGraphics.h> #import <UIKit/UIKitDefines.h> @protocol UIGestureRecognizerDelegate; @class UIView, UIEvent, UITouch; @interface Design_353_353_PinchZoom : SceneScript { @public NSString* tempHolder; } @end @implementation Design_353_353_PinchZoom -(void)load { } -(void)update { } // Gesture Reconizer Methods -(void)checkpinch { UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer >alloc]initWithTarget:self action:@selector(checkpinch)]; [pinch setDelegate:self]; [pinch setDelaysTouchesBegan:YES]; [self.view addGestureRecognizer:pinch]; [pinch release]; } -(void)render:(SPRenderSupport*)g x:(int)x y:(int)y { [super render:g x:x y:y]; } -(void)forwardMessage:(NSString*)msg { } @end