SwiftyDrop
SwiftyDrop copied to clipboard
Custom view issue
import SwiftyDrop
enum Custom: DropStatable {
case BlackGreen
var backgroundColor: UIColor? {
switch self {
case .BlackGreen: return .black
}
}
var font: UIFont? {
switch self {
case .BlackGreen: return UIFont(name: "HelveticaNeue-Light", size: 24.0)
}
}
var textColor: UIColor? {
switch self {
case .BlackGreen: return .green
}
}
var blurEffect: UIBlurEffect? {
switch self {
case .BlackGreen: return nil
}
}
}
error::
Type 'Custom' does not conform to protocol 'DropStatable'
please suggest me. how to solve this issue?
DropStatable
has textAlignment
property. So put it there to resolve the issue.
var textAlignment: NSTextAlignment? {
switch self {
default: return .left
}
}