UIResponder issues

Nibbie
Posts: 1
Joined: 2010.09
Post: #1
Hey,

I want to create a TouchDelegate class that inherits UIResponder. Right now, a UIView object taking the touch respondes instead of my instantiated TouchDelegate. How do I set TouchDelegate to receive touch respondes without it being a UIView or something similar?

Code:
//
//  TouchDelegate.h

//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#ifndef __TOUCH_DELEGATE__H_
#define __TOUCH_DELEGATE__H_

#import <UIKit/UIResponder.h>
#import <Foundation/Foundation.h>

@interface TouchDelegate : UIResponder {
    NSArray* my_beginning_touches;
    NSArray* my_moving_touches;
    NSArray* my_end_touches;
    NSArray* my_cancelled_touches;
}

@property (readonly) NSArray* my_beginning_touches;
@property (readonly) NSArray* my_moving_touches;
@property (readonly) NSArray* my_end_touches;
@property (readonly) NSArray* my_cancelled_touches;


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;

- (BOOL)isFirstResponder;


@end

#endif

Thanks
Quote this message in a reply
Post Reply