CKComponent handle tap gesture

270 views Asked by At

Is it possible to have an CKComponent without an view to handle a tap gesture?

I just found this solution WITH a view:

...

+ (instancetype)newWithViewModel:(NewsComponentViewModel *)viewModel
{
    CKComponent *comp = ...;
    return [super
            newWithView:{
                [UIView class],
                {CKComponentTapGestureAttribute(@selector(didTapView))}
            }
            component:comp];
}
1

There are 1 answers

0
Adam Ernst On BEST ANSWER

@itsthejb is correct. You must have a view to handle actions.