Skip to content

Share Style (Swift)

Weiping Huang edited this page May 13, 2017 · 3 revisions

Make a share-style BMB.

Swift | Objective-C

Share Style

BMB is able to act as a share-action-button. Check the demo for details.

  1. Set the piece-place-enum of BMB to share-style.

    bmb.piecePlaceEnum = .share
    
  2. Add builders.
    Notice that the number of builders must in range [3, +∞]. And you should use bmb.buttonPlaceEnum.buttonNumber() as a loop count. Because bmb.piecePlaceEnum.pieceNumber() could NOT know the number of the pieces when the piece-place-enum is .share.

    for _ in 0..<bmb.buttonPlaceEnum.buttonNumber() {
        bmb.addBuilder(BuilderManager.textInsideCircleButtonBuilder())
    }
    
  3. (Optional) Customize your share style BMB.

    bmb.shareLineLength = 25
    bmb.shareLineWidth = 3
    bmb.dotRadius = 6
    bmb.shareLine1Color = UIColor.black
    bmb.shareLine2Color = UIColor.black
    

More Boom-Buttons

You can add boom-buttons as many as possible by customizing positions.

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