Skip to content

Fade Views (Swift)

Weiping Huang edited this page May 14, 2017 · 2 revisions

Add faded views on BMB.

Swift | Objective-C

Fade Views on BMB

Sometimes you may wanna add an image or text to BMB. This can be achieved by:

let imageView: UIImageView = UIImageView.init(frame: CGRect.init(x: 10, y: 10, width: 40, height: 40))
imageView.image = UIImage.init(named: BuilderManager.imageName())
bmb.addFadeView(imageView)

The fade-views added to BMB will perform fade-in and fade-out animations when booming and rebooming. When BMB has a fade-view, you may want to remove the pieces. BMB does not provide any methods to remove pieces, but there is a trick to do so:

bmb.dotRadius = 0

Check demo for more details.

Home
Chapters

  1. Basic Usage
  2. Simple Circle Button
  3. Text Inside Circle Button
  4. Text Outside Circle Button
  5. Ham Button
  6. Share Style
  7. Custom Position
  8. Button Place Alignments
  9. Different Ways to Boom
  10. Ease Animations for Buttons
  11. Different Order for Buttons
  12. Other Animations Attributes for Buttons
  13. Click Event and Listener
  14. Control BMB
  15. Use BMB in Navigation Bar
  16. Use BMB in Table View
  17. Attributes for BMB or Pieces on BMB
  18. Cache Optimization & Boom Area
  19. Change Boom Buttons Dynamically
  20. Blur Background & Tip
  21. Fade Views
  22. Structure of BMB
  23. Version History
Clone this wiki locally