myRootViewController には がありUIPanGesture、UIPinchGestureにUITapGesture追加されましたmyScrollView。
-(void)viewDidLoad
{
//scroller's pan gesture
[scroller.panGestureRecognizer addTarget:self action:@selector(performScrollViewPanGesture:)];
//scroller's tap gesture
tapToEdit = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(performTapGesture:)];
tapToEdit.numberOfTapsRequired = 1.0;
[scroller addGestureRecognizer:tapToEdit];
//scroller's pinch gesture
pinchGesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(performPinchGesture:)];
[scroller addGestureRecognizer:pinchGesture];
}
にジェスチャが追加されているためmyScrollView、 を呼び出していませんでしたが、で何らかの変換を実行するためToucehsBeganに使用したかったので、 のサブクラスであるcallという名前の別のクラスを作成し、 に割り当てました。ToucehsBegantouchesMovedBackgroundTouchLayerControllerTouchesBeganUIScrolViewmyScrollView
myScrollView授業中はこれBackgroundTouchLayerだけです。
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//start Transformation of my Layers
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
//continues Tranforation
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
//perform ending Animation
}
現在、TouchesBegan常に変換を行うために を呼び出します。私が直面している問題は、アプリケーションをiPhone Retina-4 [iPhone 5] (simulator)で実行して実行Pan gestureすると、 my が呼び出され、Pan gesture handlerすべてが正しく実行されることです。しかし、アプリケーションを実行してiPhone [iPhone 4] (simulator)実行すると、のようなものPan Gestureは呼び出されず、代わりにクラスからメソッドが呼び出されます。Pan gesture handleriPhone 5TouchesBeganmyScrollView
何がうまくいかなかったのか、誰か知っていますか?
十分に明確にするために最善を尽くしましたが、それでも何か必要な場合はお問い合わせください。
前もって感謝します