문제

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