iProgressHUD icon indicating copy to clipboard operation
iProgressHUD copied to clipboard

Update to swift 4.2

Open shanezzar opened this issue 7 years ago • 0 comments

Hi, this is an awesome library please maintain it as well as add full screen along with blur effects <3

do something like this too...

extension NVActivityIndicatorType {
    private static let _count: NVActivityIndicatorType.RawValue = {
        // find the maximum enum value
        var maxValue: Int = 0
        while let _ = NVActivityIndicatorType(rawValue: maxValue) {
            maxValue += 1
        }
        return maxValue
    }()

    static func random() -> NVActivityIndicatorType {
        // pick and return a new value
        let rand = arc4random_uniform(UInt32(_count))
        return NVActivityIndicatorType(rawValue: Int(rand))!
    }
}

// usage
iprogress.indicatorStyle = .random()

shanezzar avatar Dec 15 '18 10:12 shanezzar