swift和oc的protocol的成员变量
都需要协议实现者提供具体变量;
否则认为不符合协议。
@protocol edddd <NSObject>
@property(nonatomic, strong) NSObject *egooo;
@end
Auto property synthesis will not synthesize property 'egooo' declared in protocol 'edddd'
Add a '@synthesize' directive
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController egooo]: unrecognized selector sent to instance 0x7fe3c2419b60'
protocol Paramsx {
var param:String{ get set }
}
Type 'ViewController' does not conform to protocol 'Paramsx'
Do you want to add protocol stubs?
我思故我在