Customize Plus button
I am using this framework to create floating button in my project. I have a requirement to add a button image other than the plus sign in my project. Is it possible,I have tried many ways but failed. Please suggest some codes or ideas to do so? Thanks.
Can't we change the plus button icon?
I don't think we can customize the plus button.
you need to override the createpluslayer:
class editLiquidButton: LiquidFloatingActionButton {
override func createPlusLayer(frame: CGRect) -> CAShapeLayer {
let editLayer = CAShapeLayer()
// add shapelayer here
return editLayer
}
}
But can we add image to it. If so then how?Can you please throw some light on that?
let button = LiquidFloatingActionButton(frame: frame) button.image = UIImage(named: "yourfilehere")
Thanks,I will give it a try....