As @Larme stated in a comment you are calling a method which returns a value but not using that value. You also appear to have some confusion between types.
Try this:
NSString *allhrStartTimeString = [allhrStartTime componentsJoinedByString:@"\n"];
NSLog(allhrStartTimeString);
The first line takes your original array and joins the values in it, separating each by a new line, to produce a string. The second line shows that string on the console. You should see the one element per line you seek.
However your code suggests you want the contents of each array to appear as a column in the output producing a tabular result. To do that you'll need to do a bit more work:
- Start by creating an empty instance of
NSMutableString
- Using
appendFormat: add the first line containing the headers to this mutable string
- Now loop for
ix = 0 to maximum index of your column arrays
- Using
appendFormat: again add the next two to your mutable string using the ix'th element of each of your arrays (allhrStartTime, allhrStopTime, allhrStartLocation, allhrStopLocation)
- end loop
- your mutable string now has your data represented in tabular form in it, display it in a suitable text field or dump it to the console, e.g. with
NSLog.
If you have difficulty coding this ask a new question, link to this one so people know the history, show the code you have written, and explain where you are having difficulty. Someone will undoubtedly help you along. HTH
componentsJoinedByString:returns aNSString, you don't use the returned value.