ios detecting line angle or degree
问题 I'm new to iOS , i am trying to develop a freehand drawing app, using uibezierPath .is there a way to calculate or receive the total line length, even if i drew straight line, curved or a circle. i am using addline on the the touchmove method, and i don't have any control points. 回答1: Inside your touchesBegan method, you can use this code { UITouch * touch = [touches anyObject]; CGPoint present = [touch locationInView:self]; CGPoint previous = [touch previousLocationInView:self]; CGFloat