Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to swift 4.2 #3

Open
shanezzar opened this issue Dec 15, 2018 · 0 comments
Open

Update to swift 4.2 #3

shanezzar opened this issue Dec 15, 2018 · 0 comments

Comments

@shanezzar
Copy link

shanezzar commented Dec 15, 2018

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant