i trying call protocol class in swift, giving me error
"type swiftviewcontroller not conform protocol abcdelegate.
could please tell me missing , find other posts , nothing explained , let me know if need more info.
@protocol abcdelegate <nsobject> @required - (void) abc:(nsstring*)messageresponsestr @end @interface abc : nsobject @property (nonatomic, assign) id<abcdelegate> delegate; @property(nonatomic,retain)nsstring *responsestr; -(void)network:(int)networkstate
a protocol defines abstract behaviour.
like interface in many other languages. abcdelegate
protocol states: implement me, need specify following required methods, , can choose implement following optional methods.
in case, class need implement protocol required abc
method.
Comments
Post a Comment