ios - ComponentKit Can't call super newWithView after subclassing CKCompositeComponent -
.h file
#import "ckcompositecomponent.h" @interface jwtextcomponent : ckcompositecomponent - (instancetype)newwithtext:(nsstring *)text; @end
.mm file
#import "jwtextcomponent.h" @implementation jwtextcomponent - (instancetype)newwithtext:(nsstring *)text { return [super newwithview:{ [uilabel class], { {@selector(settext:), text}, } } size:{}]; } @end
but error can't figure out why
in podfile have simply,
target 'cktest' pod 'componentkit', '~> 0.11' end target 'cktesttests' end
i tried following sample project closely possible, seems simple case of creating ckcomponent, maybe fundamental error, can't seem working.
where big white elephant hiding in blind spot?
solved:
i didn't have initialiser class initializer.
+ (instancetype)newwitht:(nsstring *)text
Comments
Post a Comment