ios - Swift 2.2 - Notepad app, Associate a separate textView to a cell without adding ViewController -


i trying make notes app, in different cells in tableview lead different note. name , add note , when cell clicked, have segue textview, when click on newly created cell, leads same note. wondering best way have different textview note when different cell clicked. don't want have different viewcontroller each note can add infinite number of notes. please tell me if need code, because not sure file or files of code need. thank in advance.

you should have 1 listviewcontroller , 1 noteviewcontroller. on prepareforsegue in listviewcontroller, need pass information. like:

let notevc = segue.destinationviewcontroller as! noteviewcontroller notevc.notetext = selectedtext //pass data note 

in noteviewcontroller, create class variable var notetext : string?


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -