unhappychoice / NoiseView

:tv: Make some noise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NoiseView

NoiseView is a view renders random noise like Noise (video) - Wikipedia.

Noise

Warning ⚠️: Due to using Metal API, this view does not render the noise correctly on simulators or some devices.

Installation

Carthage

github "unhappychoice/NoiseView"

Add metal lib

Make sure to add default.metallib to your Copy Bundle Resources section.

Usage

class ViewController: UIViewController {
    private let metalDevice: MTLDevice? = MTLCreateSystemDefaultDevice()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        view.addSubview(NoiseView(frame: UIScreen.main.bounds, device: metalDevice))
    }
}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/unhappychoice/NoiseView.

License

The library is available as open source under the terms of the MIT License.

About

:tv: Make some noise

License:MIT License


Languages

Language:Swift 80.3%Language:Metal 17.3%Language:Objective-C 2.4%