init()

Description

Creates a DcsImage object from UIImage.

Syntax

func init(image:UIImage)

Parameters

image:UIImage The image data to create the object from.

Return value

Any

Remarks

When image is nil, the exception DcsValueNotValidException will be thrown.

Example


class ViewController: UIViewController{
    var dcsView:DcsView!
    override func viewDidLoad() {
        super.viewDidLoad()
        dcsView = DcsView(frame: CGRect(x:0,y:0,width:self.view.frame.size.width,height:self.view.frame.size.height))
        view.addSubview(dcsView)
        var uiImage = UIImage(named:"xxx")
        var dcsImage = DcsImage.init(uiImage)
    }
}
Is this page helpful?

Leave a Reply

Your email address will not be published.