Hi,
I followed on some advice given on this very forum and I am still having difficulty
I have the following:
#import <UIKit/UIKit.h>
@protocol UIViewForWheelProtocol
- (void) returnImageNumber:(int)imgNum;
@end
#import <UIKit/UIKit.h>
#import "UIViewForWheelProtocol.h";
@interface UIViewForWheel : UIView {
id<UIViewForWheelProtocol> delegate;
}
@property (nonatomic, assign) id<UIViewForWheelProtocol> delegate;
@implementation UIViewForWheel
@synthesize delegate;
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
int num =1 ;
[self.delegate returnImageNumber:num];
}
#import <UIKit/UIKit.h>
#import "UIViewForWheel.h"
#import "UIViewForWheelProtocol.h"
@interface MainMenu : UIViewController <UIViewForWheelProtocol> {
}
-(void) returnImageNumber:(int)whichImage;
@end
#import "MainMenu.h"
@implementation MainMenu
- (void) returnImageNumber:(int)whichImage
{
NSLog(@"HI %i", whichImage);
}
HI 1 is not being displayed because although it is going to the touchesMoved function it is not going to the returnImageNumber in the MainMenu class.
Can someone please explain what I am doing wrong please?