Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Using Custom UIControll callback event & flickery issue #171

Open
siam-biswas opened this issue Oct 18, 2017 · 0 comments
Open

Using Custom UIControll callback event & flickery issue #171

siam-biswas opened this issue Oct 18, 2017 · 0 comments

Comments

@siam-biswas
Copy link

I'm using layoutKit with UICollectionView. Using a custom UIControll object with SizeLayout in specific Cell causing weird behavior.

  let reaction =  SizeLayout<ReactionButton>(
        height: 40,
        viewReuseId: "reaction",
        config: { reactionButton in

                reactionButton.reactionSelector = ReactionSelector()
                
                reactionButton.config = ReactionButtonConfig() {
                    $0.iconMarging      = 8
                    $0.spacing          = 6
                    $0.alignment        = .centerLeft
                }
                
                reactionButton.reaction = content.reaction
                
                if let selector = content.reactionSelector{
                    reactionButton.addTarget(content.target, action: selector, for: .valueChanged)
                    reactionButton.addTarget(content.target, action: selector, for: .touchUpInside)
                }
            
    })

.ValueChangeD and .TouchUpInside event gets called multiple times in different indexes for a Single Press event. And also there is a flickery issue exist while scrolling if I generate the cell layout with this custom UIControll.

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

No branches or pull requests

1 participant