//viewdidload
{
str1 = [[NSMutableString alloc] initWithCapacity:0];
str2 = [[NSMutableString alloc] initWithCapacity:0];
}//
for (int pq=1; pq<=temp; pq++)
{
str1 = [NSMutableString stringWithString:[documentManager wholeTextForPage:pq] ] ;
[self.str2 appendString:str1];
NSLog(@"content of page chumma1: %@",str1);
}
NSLog(@"cwhole text: %@",str2
**这里 str1 在每次迭代时返回不同的字符串。我试图将 str1 返回的每个字符串附加到 str2。但是 str2 在第一次迭代时只返回 str1 返回的一个字符串。其他迭代返回的字符串不会附加到 str2。请帮我想办法解决这个问题。提前致谢。
感谢和问候VEERA **