Implementation of IntelligentScissors in ios