ios - how to save the content of a uitextview to a tableview -


I have UITextView and when I press the 'Save' button I like it! Code> text will be added to a line in my UITableView . I already set the table view I would like to go to UITextView while selecting one on the table view.

First of all, you have to add the data to your data source. Depending on the establishment of your desk, if you edit your question with more details, then I can get more specificity here.

Next you call insertRowsAtIndexPaths: WithRowAnimation: Changing the value of the index path depending on the table view on which you add new data.

The table view will take care of the rest, call it to cellForRowAtIndexPath: using the new table cell (using data that you have just added to the data source) And you can even animate it in this situation.

For the second part of your question, you will need to implement the tableView: didSelectRowAtIndexPath: and it will receive the appropriate string based on the selected data from your data source, and Set text view accordingly. Something like this

  textView.text = myDataSourceArray [indexPath.row];    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -