-
Notifications
You must be signed in to change notification settings - Fork 112
Attributes for BMB or Pieces on BMB (Swift)
Weiping Huang edited this page May 26, 2017
·
5 revisions
How to change the size or margins of dots on BMB?
Swift | Objective-C
We always talk about the attributes for boom-buttons of BMB, how about BMB itself?
bmb.hasShadow = true
bmb.shadowColor = UIColor.darkGray
bmb.shadowPathRect = CGRect.init(x: 0, y: 0, width: 60, height: 60)
bmb.shadowOffsetX = 2
bmb.shadowOffsetY = 2
bmb.shadowRadius = 5;
bmb.normalColor = UIColor.white
bmb.highlightedColor = UIColor.lightGray
bmb.unableColor = UIColor.black
BMB can be set to unable
state by bmb.isUserInteractionEnabled = false
bmb.draggable = true
bmb.edgeInsetsInSuperView = CGRect.init(x: 20, y: 20, width: 20, height: 20)
The effect of draggable-BMB looks like below:
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.
bmb.buttonHorizontalMargin = 20
bmb.buttonVerticalMargin = 20
bmb.buttonInclinedMargin = 20
bmb.dimColor = UIColor.darkGray
You can also add a blur-effect to background, check wiki for details.
Home
Chapters
- Basic Usage
- Simple Circle Button
- Text Inside Circle Button
- Text Outside Circle Button
- Ham Button
- Share Style
- Custom Position
- Button Place Alignments
- Different Ways to Boom
- Ease Animations for Buttons
- Different Order for Buttons
- Other Animations Attributes for Buttons
- Click Event and Listener
- Control BMB
- Use BMB in Navigation Bar
- Use BMB in Table View
- Attributes for BMB or Pieces on BMB
- Cache Optimization & Boom Area
- Change Boom Buttons Dynamically
- Blur Background & Tip
- Fade Views
- Structure of BMB
- Version History