Initial array:
1, 2, 3, 4
After [arr insertObject:@"1.1" atIndex:1]
:
1, 1.1, 2, 3, 4
After [arr insertObject:@"1.2" atIndex:2]
:
1, 1.1, 1.2, 2, 3, 4
After [arr removeObjectAtIndex:1]
:
1, 1.2, 2, 3, 4
After [arr removeObjectAtIndex:2]
1, 1.2, 3, 4
So everything is correct. If you want to remove the elements that you inserted earlier, then you have to remove them in reverse order:
[arr removeObjectAtIndex:2];
[arr removeObjectAtIndex:1];
In this case, the final result would be 1, 2, 3, 4
again.