ios - Photo album App swift lang, couple functions with errors -


  1. error message "'string?' not convertible 'string'"

    override func prepareforsegue(segue: uistoryboardsegue, sender:                                   anyobject?) { **if(segue.identifier string == "viewlargephoto")**{     let controller:viewphoto = segue.destinationviewcontroller     viewphoto let indexpath: nsindexpath =             self.collectionview.indexpathforcell(sender uicollectionviewcell)  controller.photoasset = self.photoasset controller.assetcollection = self.assetcollection 
  2. error message: not find member 'aspectfill'

    let asset: phasset = self.photoasset[indexpath.item] as! phasset phimagemanager.defaultmanager().requestimageforasset(asset,         targetsize: phimagemanagermaximumsize, contentmode: .aspectfill, options:         nil,     resulthandler: {(result:uiimage!, info:nsdictionary!)in     cell.setthumbnailimage(result) })          return cell 

please , thank you

try omitting explicit type declaration info on resulthandler function.
worked me.


Comments