Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] Touch gesture help #137

Open
snc001 opened this issue Jun 18, 2019 · 0 comments
Open

[Help] Touch gesture help #137

snc001 opened this issue Jun 18, 2019 · 0 comments

Comments

@snc001
Copy link

snc001 commented Jun 18, 2019

I am currently using this library with this cardView

So I have gotten the collectionKit to work fine and I have also gotten the other library to work fine when its separated on its own but not when its being used with CollectionKit.

        let sizeSource = { (index: Int, data: Int, collectionSize: CGSize) -> CGSize in
            return CGSize(width: self.cellWidth, height: self.cellHeight)
        }
        
        let viewSource = ClosureViewSource(viewUpdater: { (view: CardHighlight, data: Int, index: Int) in
            view.backgroundColor = UIColor(red: 0, green: 94/255, blue: 112/255, alpha: 1)
            view.icon = UIImage(named: "Kush")
            view.title = "Welcome \nto \nCards !"
            view.itemTitle = "Flappy Bird \(index)"
            view.itemSubtitle = "Flap That \(data)!"
            view.textColor = UIColor.white
            
            view.hasParallax = true
            view.delegate = view.self
            
            view.shouldPresent(cardContentVC, from: self, fullscreen: false)
            
            self.view.addSubview(view)
        })
        
        let provider = BasicProvider(
            dataSource: dataSource,
            viewSource: viewSource,
            sizeSource: sizeSource
        )
        
        let inset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
        provider.layout = FlowLayout(spacing: 10, justifyContent: .spaceEvenly).inset(by: inset)
        provider.animator = FadeAnimator()
        //lastly assign this provider to the collectionView to display the content
        //self.collectionView.removeGestureRecognizer(self.collectionView.tapGestureRecognizer)

        self.testCollectionView.provider = provider
    }

I guess what I am asking is:
What else could be interfering with the touch gesture on when I am invoking a card?

I also have tried removing the collectionView gesture thinking that was it but it wasn't (hence it is now commented out).

Any help is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant