ios - Internal name swift 2.0+? -


this question has answer here:

before update swift 2.0+ worked. there no internal parameters?

how should change let work correctly?

i found out need delete "func" , "#" didn't d:

mycode

func previewfile(#path: nsindexpath) {     uiapplication.sharedapplication().networkactivityindicatorvisible = false     self.fileisloading = false     let previewql = qlreaderviewcontroller()     previewql.datasource = self     previewql.delegate = self     previewql.hidesbottombarwhenpushed = true     self.filepath = path     self.navigationcontroller?.pushviewcontroller(previewql, animated: true) } 

so did ... enter image description here

but if delete "path" work correctly? why declaration of parameter changed so? mean - works. why

previewfile(indexpath!) 

instead of

previewfile(path: indexpath!) 

you can't use # internal argument naming anymore. should write function like:

func previewfile(path path: nsindexpath) {    // code } 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -