core image - Swift: Instance variable takes precedence over class constructor? -


i'm having issue while attempting extend uiimage. i'm creating new method part of processing creates ciimage. unfortunately since uiimage contains instance variable name ciimage, compiler seems think constructor trying reference instance variable rather ciimage class:

extension uiimage {       func newmethod() {     let image = ciimage(cgimage: self.cgimage) // error: cannot invoke 'ciimage' argument list of type '(cgimage: cgimage!)'   } } 

is there workaround call ciimage constructor within context of uiimage extension?

you can reference type explicitly prefacing module name.

extension uiimage {       func newmethod() {     let image = coreimage.ciimage(cgimage: self.cgimage)   } } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -