public void removeByTag(int tag) { switch (subtestNumber) { case 1: case 4: case 7: parent.RemoveChildByTag(tag + 100, true); break; case 2: case 3: case 5: case 6: case 8: case 9: batchNode.RemoveChildAtIndex(tag, true); // [batchNode removeChildByTag:tag+100 cleanup:YES]; break; default: break; } }