I have written a class that is a subclass of UIImageView and has some custom methods in it.
I now find I need yet another UIImageView subclass along the same lines but with a different version of some of the methods.
I have been looking at using @Protocol but suspect as usual I haven't grasped the bleedin concept!
My thoughts were this:
Create the inteface file of the custom class like with the protocol in it like so:
I read that I do not need to create an implementation file as the class subclassing this will do so.
So I then create a class of type CustomImageView like so
and subsequently get more errors than you can wave a stick at!
Am I so far off beam I should be thrashed with a large iceberg lettuce?
I now find I need yet another UIImageView subclass along the same lines but with a different version of some of the methods.
I have been looking at using @Protocol but suspect as usual I haven't grasped the bleedin concept!
My thoughts were this:
Create the inteface file of the custom class like with the protocol in it like so:
Code:
#import <UIKit/UIKit.h>
@interface CustomImageView : UIImageView {
}
@protocol CustomImageViewMethods
-(void) doubleTap;
@end
I read that I do not need to create an implementation file as the class subclassing this will do so.
So I then create a class of type CustomImageView like so
Code:
@interface myImageView : CustomClassView <CustomImageViewMethods> {
}
and subsequently get more errors than you can wave a stick at!
Am I so far off beam I should be thrashed with a large iceberg lettuce?