Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Custom view issue #70

Open
rameshpjpti opened this issue Nov 17, 2019 · 1 comment
Open

Custom view issue #70

rameshpjpti opened this issue Nov 17, 2019 · 1 comment

Comments

@rameshpjpti
Copy link

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?

@BukhariMuslim
Copy link

DropStatable has textAlignment property. So put it there to resolve the issue.

  var textAlignment: NSTextAlignment? {
    switch self {
    default: return .left
    }
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants