在UITextView中显示数组内容

时间:2014-05-01 11:54:37

标签: uitextfield nsarray

我正在尝试在UITextView中显示我的数组内容。这应该很简单。该数组使用NSlog回应

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

使用以下内容并不起作用,因为我知道阵列需要分解。

cell.textField.text = arrayContents; 

我正在研究如何遍历数组并在UITextField中显示内容?该数组存储在arrayContents

1 个答案:

答案 0 :(得分:2)

您无法使用UITextField执行此操作,但可以在UITextView中执行此操作。试试这个。如果在textfield中使用,则输出将为Point 1 Point 2 Point 3

textView.text = [YourArrayName componentsJoinedByString:@"\n "];