0

是否可以让 CKComponent 没有视图来处理点击手势?

我刚刚找到了这个解决方案:

...

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

1 回答 1

1

@itsthejb 是正确的。您必须具有处理操作的视图。

于 2015-06-02T19:59:32.633 回答