Hello, I need to develop an application which has a interface which implements methods of 3 protocols. Assume protocol A extends protocol B and protocol C, and interface implements protocol A. This is how my code looks,
// This is in MyClass.h file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "protocol_A"
@interface MyClass : NSObject <protocol_A>
{
}
@end
//This is MyClass.m file
#import "MyClass.h"
@implementation myClass
-(void)methodinA
{
NSLog(@"I'm in protocol_A");
}
}
-(void)methodinB
{
NSLog(@"I'm in protocol_B");
}
-(void)methodinC
{
NSLog(@"I'm in protocol_C");
}
@end
//This is protocol_A.h file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "protocol_B.h"
#import "protocol_C.h"
@protocol protocol_A <protocol_B, protocol_C>
-(void)methodinA;
@end
//This is in protocol_B.h file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol protocol_B
-(void)methodinB;
@end
//This is in protocol_C.h file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol protocol_C
-(void)methodinC;
@end
i'm getting an exception , and my app is getting crashed...
***Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MyClass 0X323nm31>setvalue:forundefinedKey:]:this class is not key value coding-compilant for the key window'.
Plz Tel me how to solve this problem??