ios - Accessing an outlet in another class (Swift) -


i trying access outlet, imageview, in class. when type outlet name, generates error, outlet in class. how access imageview outlet in class?

code:

//class trying call outlet in override func viewdidload() {     super.viewdidload()            if photosasset == nil {          //error: use of unresolved identifier: myimageview, since myimageview in class photothumbnail         myimageview.image = ""     }    //class oulet  class photothumbnail: uicollectionviewcell {     @iboutlet var myimageview : uiimageview!  } 

create photothumbnail object

var photothumbnail = photothumbnail() // without initializers

then

photothumbnail.image

since collectionviewcell, in cellforitematindexpath method


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 -