Skip to content

Blur Background & Tip (Swift)

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

Blur background when booming.

Swift | Objective-C

Blur Background

The background when booming can have a blur effect by:

bmb.backgroundBlurred = true
bmb.blurEffect = UIBlurEffect.init(style: UIBlurEffectStyle.extraLight)

Tip

You can add a text on background which is called tip in BMB:

bmb.tip = "Select an animal to feed!"

Try to customize the label of tip if you want:

// The margin (in points) between label of tip and the highest boom-button (if tipBelowButtons is NO) or the lowest boom-button (if tipBelowButtons is false).
bmb.tipButtonMargin = 30
// Whether the tip string is put below the boom-buttons on background.
bmb.tipBelowButtons = true

bmb.tipLabel().textColor = UIColor.darkGray
bmb.tipLabel().font = UIFont.systemFont(ofSize: 15)

Fade Views in Background

You can add views to perform fade-in and fade-out animations when booming and rebooming to background by:

bmb1.addViewToBackground(view: addedView)

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