A very small pull-up refresh was very simple and has been done before, but this time there are hundreds of problems, this problem is even more troublesome for nearly a day, as I could not solve this problem, I could not really fall asleep. So I put down my work and gave up my mind carefully. Then I took a hard look at this article and got it done, after reading this article on both sides, you can understand it with a thorough understanding.
The reason is that the variable was assigned a value before, and a variable method cannot be stubbornly assigned to an immutable object.
The original text is excerpted as follows:
Error message :*
Terminating app due to uncaught exception 'nsinternalinconsistencye Xception ', reason :'* -[Nscfarray insertobject: atindex:]: mutating method sent to immutable object'
The problem occurs in the statement:
[SavearrayAddobject: [nsnumber numberwithint: savenum];
A mutable method is sent to an immutable object.
PS: @ property (nonatomic, retain)
Nsmutablearray *Savearray;
Previously assigned values:
Nsmutablearray * Array
= [[Nsmutablearray alloc] init];
Self. savearray=
Array;
[Array release];
Solution:
Nsmutablearray * mutaarray
= [[Nsmutablearray alloc] init];
[Mutaarray addobjectsfromarray: savearray];
[Mutaarray Addobject: [nsnumber Numberwithint: savenum];
Self. savearray
= Mutaarray [mutaarray release];
Address: http://blog.sina.com.cn/s/blog_6123f9650101b0zl.html