title: Error : "Range {2147483647, 1} exceeds maximum index value of NSNotFound - 1" while updating code from ios 5.x to 6.0
body: <p>I am trying to update my application from ios5.x to 6.0.My code is running perfectly in ios 5.1.1 but when i run in ios6.0 i am getting error </p>
  
  <p><code>"Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableIndexSet addIndexesInRange:]: Range {2147483647, 1} exceeds maximum index value of NSNotFound - 1'"</code></p>
  
  <p>on the click of button.
  Please suggest any solution</p>