Domanda

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

È stato utile?

Soluzione

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 "];
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top