Skip to content

Attributes for BMB or Pieces on BMB (Objective C)

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

How to change the size or margins of dots on BMB?

Swift | Objective-C

Attributes for BMB

We always talk about the attributes for boom-buttons of BMB, how about BMB itself?

For BMB Itself

For shadow:
bmb.dotRadius = 2;
bmb.hamWidth = 30;
bmb.hamHeight = 2;
bmb.pieceCornerRadius = 1;
bmb.pieceHorizontalMargin = 2;
bmb.pieceVerticalMargin = 2;
bmb.pieceInclinedMargin = 2;
bmb.buttonHorizontalMargin = 20;
bmb.buttonVerticalMargin = 20;
bmb.buttonInclinedMargin = 20;
bmb.dimColor = [UIColor darkGrayColor];
For button:
bmb.normalColor = [UIColor whiteColor];
bmb.highlightedColor = [UIColor lightGrayColor];
bmb.unableColor = [UIColor blackColor];

BMB can be set to unable state by bmb.userInteractionEnabled = NO;

For draggable-BMB:
bmb.draggable = YES;
bmb.edgeInsetsInSuperView = UIEdgeInsetsMake(20, 20, 20, 20);

The effect of draggable-BMB looks like below:

For Pieces on BMB

For pieces lay on BMB:

bmb.dotRadius = 2;
bmb.hamWidth = 30;
bmb.hamHeight = 2;
bmb.pieceCornerRadius = 1;
bmb.pieceHorizontalMargin = 2;
bmb.pieceVerticalMargin = 2;
bmb.pieceInclinedMargin = 2;

You can change the dots on BMB to small squares by setting the pieceCornerRadius property, which is useful when the boom-buttons are in square-shape:

Check the demo for more information.

For Boom-Buttons on BMB

bmb.buttonHorizontalMargin = 20;
bmb.buttonVerticalMargin = 20;
bmb.buttonInclinedMargin = 20;

For Background Color When Booming

bmb.dimColor = [UIColor darkGrayColor];

You can also add a blur-effect to background, check wiki for 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