Comments (1)
Unfortunately this control doesn't support arbitrary Bezier paths. The reason being that for the layer to 'clip' to a path, we have to mask it. If we mask it, we lose the underlying shadow :/
If we use .layer.cornerRadius
(which this control currently does) then we don't have to mask anything, but we affect all 4 corners.
However, if I can find some time I will try and work around this for the next release.
As for the border color and border width, you can add these yourself very easily until the feature makes it into the release version by adding some code to BFPaperButton.h/m:
Add to BFPaperButton.h:
@property (nonatomic) IBInspectable UIColor *borderColor;
@property (nonatomic) IBInspectable CGFloat borderWidth;
Add to BFPaperButton.m:
// In -(void)layoutSubviews, towards the bottom of this function, right before [self setEnabled:self.enabled];
self.layer.borderColor = self.borderColor.CGColor;
self.backgroundColorFadeLayer.borderColor = self.borderColor.CGColor;
self.layer.borderWidth = self.borderWidth;
self.backgroundColorFadeLayer.borderWidth = self.borderWidth;
// Right after #pragma mark - Setters, add these 2 functions:
- (void)setBorderColor:(UIColor *)borderColor {
_borderColor = borderColor;
self.layer.borderColor = borderColor.CGColor;
self.backgroundColorFadeLayer.borderColor = borderColor.CGColor;
}
- (void)setBorderWidth:(CGFloat)borderWidth {
_borderWidth = borderWidth;
self.layer.borderWidth = borderWidth;
self.backgroundColorFadeLayer.borderWidth = borderWidth;
}
from bfpaperbutton.
Related Issues (20)
- hi~ I have found a problem with the button HOT 11
- the button does not work when it is created in a UITableViewCell HOT 12
- Fast touch up inside HOT 2
- tapCircleDiameter and different growth depending on longpress and normal touch HOT 5
- Use with Storyboard and IB?
- only really notice effects on long press HOT 8
- Swift 2.0 Version HOT 6
- How to use it with Storyboard? HOT 2
- Animations can't play when Buttons in UIScrollView HOT 3
- Run is not smooth HOT 3
- Animation on button doesn't work when button's parent ViewController is embed into a container view (i.e child viewController) HOT 4
- You have this bug HOT 3
- layoutSubviews ignores enabled property HOT 1
- bug HOT 2
- Get rid of dots HOT 3
- Raised using Storyboard
- Crash iOS 9.2 below archive by xcode 10.1
- Problem : delegate for global animation
- Disabled state for raised button no longer removes shadow after tapped at least once. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bfpaperbutton.