开发者

NSMutableString doesn't get append

开发者 https://www.devze.com 2023-03-13 02:47 出处:网络
[string appendString:@\"\"]; ((appdelegete *)[UIApplication sharedApplication].delegate).salesReceipt.old = [string ];
[string appendString:@""];
((appdelegete *)[UIApplication sharedApplication].delegate).salesReceipt.old = [string ];

I want to add all my elements in my NSMutableString string whose data are getting collected. What is the best way to do it?In my appdelegate class there is a NSMutableString in which I am going to store all the elements from the NS开发者_JAVA技巧MutableString


NSMutabelString* string = [[NSMutabelString alloc] initWithCapacity:2]
[string appendString:@"My String "];
[string appendString:@""];
//Now you need to access your NSMutableArray from Delegate add add the string.
 NSMutableArray* myArray = ((appdelegete *)[UIApplication sharedApplication].delegate).salesReceipt.items ;
[myArray addObject:string];
0

精彩评论

暂无评论...
验证码 换一张
取 消