I am trying to display my array contents in a UITextView. This should be simple. The array echoes using NSlog

(
        (
        "Point 1",
        "Point 2",
        Point3
    )
)

using the following doesn't work as I know the array needs to be broken down.

cell.textField.text = arrayContents; 

I am looking at how to cycle through the array and display the content in a UITextField? The array is stored in arrayContents

有帮助吗?

解决方案

You can't do this with UITextField but it is possible in UITextView. Try this. If you used in textfield the output will be Point 1 Point 2 Point 3

textView.text = [YourArrayName componentsJoinedByString:@"\n "];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top