jeudi 26 mars 2015

__NSArrayI stringByReplacingOccurrencesOfString:withString: in parse data

i make an app that fetch Parse.com website data and save it in to string and assign this string to label text then error is occurred as __NSArrayI stringByReplacingOccurrencesOfString:withString:


My code like as



PFQuery *query = [PFQuery queryWithClassName:@"MapInfo"];
[query whereKey:@"GPIN" equalTo:self.qpinString];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error)
{
self.addedBy=[objects valueForKey:@"AddedBy"];
self.address=[objects valueForKey:@"Address"];
NSString *addedby=self.addedBy;
NSLog(@"%@",[[[addedby stringByReplacingOccurrencesOfString:@")" withString:@""] stringByReplacingOccurrencesOfString:@"(" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""]);
}


And when i write code like as



self.nameLabel.text=[NSString stringWithFormat:@"%@",self.addedBy];


then not any error occurred but i get label text with backers and whitespace also with parenthesis so i trim my string but i get this error please help me.


Aucun commentaire:

Enregistrer un commentaire