ios - Remove Parentheses From NSMutableArray -


i having trouble removing parentheses nsmutablearray. filling objects retrieved parse pfquery. works trying bring objects array label inside uitableviewcell. in label showing: ( name ) name thing want show cannot remove these brackets. trying:

nsmutablearray *flattenarray = [[nsmutablearray alloc] init];     for(nsstring *str in [namearray objectatindex:indexpath.row])     {         [flattenarray addobject:str];     }     nsstring *string = [flattenarray componentsjoinedbystring:@""]; 

and setting label's text string created @ bottom. filling array with:

namearray = [[nsmutablearray alloc] init];     pfquery *finddata = [pfquery querywithclassname:[nsstring stringwithformat:@"employee_%@", [[pfuser currentuser] username]]];     [finddata setlimit:1000];     [finddata findobjectsinbackgroundwithblock:^(nsarray *objects, nserror *error) {         if (error == nil) {             (pfobject *object in objects) {                 pfobject *name = object[@"clientname"];                 nsmutablearray *arraypost = [[nsmutablearray alloc] initwithobjects:name, nil];                 [namearray addobject:arraypost];             }             [table reloaddata];         } else {             uialertview *alert = [[uialertview alloc] initwithtitle:@"error" message:@"unable load" delegate:self cancelbuttontitle:@"ok" otherbuttontitles:nil, nil];             [alert show];         }     }]; 

does have ideas on how fix this?

thanks

why create single-element array hold name @ all? simple put name directly namearray:

   pfobject *name = object[@"clientname"];    [namearray addobject:name]; 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -