Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func setupWithParticle(_ particle: ParticleProtocol, isFavourite: Bool = false) {
- self.particleLabel.text = particle.name(withColor: false)
- let particleView = ParticleView(position: CGPoint.zero, width: self.particleViewContainer.width, particle: particle)
- particleView.respondsToTouch = false
- particleView.setBorders([.Top, .Left, .Right, .Bottom], width: 1, color: .black())
- if isFavourite {
- particleView.backgroundColor = #colorLiteral(red: 0.9559464455, green: 0.7389599085, blue: 0.2778314948, alpha: 1)
- }
- self.particleViewContainer.addSubview(particleView)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement